Zählung Kommentare
Vielen Dank für den Tipp. Verstehe ich auch von der Logik her. Nur wie setze ich das in php um? Hier der Code dazu im Original:
PHP
<?php if ($comments) : ?>
<h3 id="comments"><?php comments_number('Keine Kommentare', 'Ein Kommentar', '% Kommentare' );?> to “<?php the_title(); ?>”</h3>
<ol class="commentlist">
<?php $commentnumber = 1?>
<?php foreach ($comments as $comment) : ?>
<li id="comment-<?php comment_ID() ?>" class="<?php echo $oddcomment; /* Style differently if comment author is blog author */ if ($comment->comment_author_email == get_the_author_email()) { echo ' Autorenkommentar'; } ?>">
<div class="cmtinfo"><small class="commentmetadata"></small><cite><?php comment_author_link() ?></cite><em>am <?php comment_date('j. F Y') ?> um <?php comment_time() ?> <?php edit_comment_link('Bearbeiten','',''); ?></em><a href="#comment-<?php comment_ID() ?>" title=""><span class="number"><?php echo $commentnumber; $commentnumber++;?></span></a></div>
<?php if ($comment->comment_approved == '0') : ?>
<em>Der Kommentar muss noch freigegeben werden.</em>
<?php endif; ?>
<?php comment_text() ?>
</li>
<?php /* Changes every other comment to a different class */
if ('alt' == $oddcomment) $oddcomment = '';
else $oddcomment = 'alt';
?>
<?php endforeach; /* end for each comment */ ?>
</ol>
Alles anzeigen
Hier ist das Problem dazu:
Eine Lösung dürft vielleicht ALLE interessieren, die irgendwo lange Kommentarlisten haben...