Make Your Comments Backwards Compatible

December 2nd, 2008 | Author: Chip

First you should rename your comments.php to legacy.comments.php. Download the 2.7-enhanced comments version here:

comments.zip

Edit your functions.php file and add the following lines:

<?php
add_filter('comments_template', 'legacy_comments');
function legacy_comments($file) {
if(!function_exists('wp_list_comments')) : // WP 2.7-only check
$file = TEMPLATEPATH . '/legacy.comments.php';
endif;
return $file;
}
?>

That’s all.

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv Enabled
Get Adobe Flash playerPlugin by wpburn.com wordpress themes