Easy way to Create WordPress 2.7 Threaded (nested) Comments Display



Advertisements

WordPress 2.7 is packed with many new features and one among them is Threaded Comment Display. WordPress 2.7 supports both paging and threading. You can use existing theme, but unless you make the theme Threaded Comment Display compatible you will not be able to make use of new comment feature.

I wanted to make my Comment section WordPress 2.7 compatible and Google search drove me to WordPress 2.7 Comments Enhancements by ottodestruct.com. This Website will guide you to make your theme threaded Comment compatible, backward compatible and code changes are explained in detail.

I have figured out easy way and followed this method to make my theme Threaded Comment compatible. First, in the header.php, add this line immediately before the call to wp_head( ):

<?php if ( is_singular() ) wp_enqueue_script( ‘comment-reply’ ); ?>

As usual WordPress package comes with default theme and WordPress 2.7 default theme is all set to Threaded Comment Display. All you have to do is copy the comments.php from the default theme and replace it with your themes comments.php.

Note: Please make backup of your existing theme before making any changes.

Now your theme is Threaded Comment compatible, little bit knowledge of CSS styling is required so that you can make comment box, div class, div id, color and font suit your theme.

As you are using comments.php of default theme, CSS div class and div id will also be changed. Go through the Comments CSS Styling in Style.css of default themes and make necessary changes to your existing Style.css.

Note: Threaded (nested) comments are not enabled by default. You have to go to the Settings -> Discussion panel and Enable it.

Posted by MiLaN on 30 January, 2009
No comments yet

Related Posts:

Liked this article? Then SUBSCRIBE to our RSS Feed or get Free updates via E-MAIL