Hallo!
Ich habe mittlerweile sämtliche Comment-Templates durchsucht und in meins eingefügt und stets werden keine Kommentare ausgegeben, obwohl welche vorhanden sind!
Aber der Reihe nach:
Hier ist erstmal das Stück Template-Code, das ich derzeit verwende:
PHP
<?php if ($comments) { ?>
<ol class="commentlist" id="commentlist">
<?php $count = 0; foreach ($comments as $comment) { ?>
<li id="comment-<?php comment_ID() ?>"<?php global $comment; if ( ($comment->comment_author_email == get_the_author_email()) && ($comment->user_id != 0) ) {echo ' class="mein_kommentar"';} else {echo ' class="' . $oddcomment . '"';} ?>>
<?php if (get_comment_type() == 'comment') : ?>
<?php endif; ?>
<cite><?php comment_author_link() ?> sagt:</cite>
<?php if (get_comment_type() == "comment") comment_text() ?>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e('! Dein Kommentar muss noch moderiert werden !'); ?></em>
<?php endif; ?>
<small class="commentmetadata"><?php comment_date( get_option('date_format') ) ?>, <?php comment_time('H:i') ?> <?php edit_comment_link('· Edit','',''); ?></small>
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) {
$oddcomment = '';
} else {
$oddcomment = 'alt';
}
?>
<?php } /* end for each comment */ ?>
</ol>
<?php } else { echo "Nothing there"; } ?>
Alles anzeigen
Auf meiner betroffenen Seite http://konstantin-volke.de/japan/the-umbr…t-girl-322.html steht demnach in der Kommentarbox "Nothing there", obwohl 3 Kommentare vorhanden sein müssten.
Ich habe kurz gesagt ein Problem mit der comment-Loop. Lasse ich jedoch den Satz " if ($comments) " heraus, wird scheinbar ein falsches Argument an die foreach-Funktion überliefert.
Über einen Hinweis zur Problemlösung wäre ich sehr dankbar!
Schönes Wochenende
Konstantin