Make comments section WordPress 2.7 compatible

November 8, 2008 · Print This Article

Here’s a basic comments loop for WordPress 2.7. You just have to replace your current comment loop with that one to make it work with WordPress 2.7.

if (have_comments()) : ?>
<h4 id="comments"><?php comments_number('No Comments', 'One Comment', '% Comments' );?></h4>
<ul class="commentlist">
<?php wp_list_comments(); ?>
<div class="navigation">
<div class="alignleft"><?php previous_comments_link() ?></div>
<div class="alignright"><?php next_comments_link() ?></div>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post->comment_status) :
// If comments are open, but there are no comments.
else : // comments are closed

Your choice for site templates and wordpress themes


Got something to say?

You must be logged in to post a comment.