<?php if ( post_password_required() ) { return; } ?>
<div id="comments" class="comments-area">
<?php if ( have_comments() ) { ?>
<h2 class="comments-title">
<?php printf( _n( 'Ein Eintrag im “%2$s”', '%1$s Einträge im “%2$s”', get_comments_number(), 'twentytwelve' ), number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' ); ?>;
</h2>
<ol class="commentlist">
<?php wp_list_comments( array( 'callback' => 'twentytwelve_comment', 'style' => 'ol' ) ); ?>
</ol><!-- .commentlist -->
<?php if ( get_comment_pages_count() > 1 && get_option( 'page_comments' ) ) { ?>
<nav id="comment-nav-below" class="navigation" role="navigation">
<h1 class="assistive-text section-heading"><?php _e( 'Comment navigation', 'twentytwelve' ); ?></h1>
<div class="nav-previous"><?php previous_comments_link( __( '← Older Comments', 'twentytwelve' ) ); ?></div>
<div class="nav-next"><?php next_comments_link( __( 'Newer Comments →', 'twentytwelve' ) ); ?></div>
</nav>
<?php }
if ( ! comments_open() && get_comments_number() ) { ?>
<p class="nocomments"><?php _e( 'Comments are closed.' , 'twentytwelve' ); ?></p>
<?php }
}
?>
<?php $comments_args = array( 'title_reply'=>'Deinen Gästebucheintrag hinzufügen', 'label_submit'=>'Gästebucheintrag absenden', 'comment_field' => '<p class="comment-form-comment"><label for="comment">Deine Nachricht</label><br /><textarea id="comment" name="comment"></textarea></p>' ); comment_form($comments_args);?>
</div><!-- #comments .comments-area -->
Alles anzeigen
Das hat mich ein bisschen an die Übungsaufgaben vor 25 Jahren erinnert bei denen man versucht hat den Prüfling hinters Licht zu führen ;-)
In guestbook-comments.php darfst Du <?php comments_template( '/guestbook_comments.php', true ); ?> natürlich nicht mehr verwenden. Das gibt den Megaloop bis der Ram ausgeht (memory exhaustet)
Ich habe den Code eingekürzt. Außerdem gebe ich zu Protokoll , dass ich diese PHP/HTML Mixerei hasse und erneuere meine Forderung Code und Layout endlich zu trennen :-D