Create a wordpress 2.7 compatible comments template

November 20, 2008

WordPress 2.7 includes a lot of new enhancements, but one of the big ones is the new comment functionality. Comments can be threaded, paged, etc. This is all built in, but unfortunately, your theme must support it. So, for theme authors, I’d suggest getting to work on making your themes compatible right away. How to create a wordpress 2.7 compatible comments.php If you want your theme to be backward compatible as well, then there’s a simple way to do it. Just check for the wp_list_comments function, like so: if (function_exists('wp_list_comments'))... [Read the full story]

Make your comments template compatible with WordPress 2.7 and older versions

November 11, 2008

You’ll need two file: The first one is a WordPress 2.7 compatible comments file, named comments.php. The second one is a comment template for older WordPress versions, named legacy.comments.php in this exemple. Paste this elegant code in your theme functions.php file. Create this file if it do not exists yet. If the wp_list_comments() function doesn’t exists, the code will automatically load legacy.comments.php instead of comments.php. <?php add_filter('comments_template', 'legacy_comments'); function legacy_comments($file)... [Read the full story]

Page 1 of 11