wp_list_comments In WordPress 2.7
September 18th, 2008 by Michael • WordPress News • 4 Comments
The comment functionality enhances quite a bit in WordPress 2.7. Additional to the possiblility to answer comments directly in your backend, there is also a threaded comment support available. Threaded comments enables users to reply on an exist comment, and the discussion will be displayed threaded or nested. Below you can see a screenshot from the default theme:

If you take a look into comments.php, you will notice some alterations. A short "comment loop" was introduced wp_list_comments() and it manages the complete output of comments. Here is the code:
<?php if ( have_comments() ) : ?> <ol class="commentlist"> <?php wp_list_comments($comments); ?> </ol> <?php else: ?> // some other code <?php endif; ?>
This purge the comments.php immense. But it might be a disadvantage for theme authors, since they hardly have the possibility to change the output of comments. And that WordPress developers having their own vision of HTML and CSS is a common knowledge. Right now, we have to wait and see, since it's an early version. It will be interesting how this develops.
Info
- Published in WordPress News
- Tags: comments, template_tag, Theme, WordPress
- Comment feed | Trackback URL
- read: 4746 | today: 7
- leave a Comment



I'm not so sure this is going to be a negative thing, but man am I having a difficult time understanding how to fully style the comments now. Its not like we can just edit a class in CSS now. There's more to it and its a little frustrating right now. Oh well.
I really need to see how the comment data is spit out to the template so I can add certain things for my plugins. I hope something more comes out soon!
Hey Dan and Andy, we surely will provide helpful posts on this subject in the near future. Stay tuned.