How to Make Your Comments Compatible with WordPress 2.7 and Earlier Versions

Posted by on Mar 14, 2009 in Wordpress and Blogging Tips | 0 comments

WordPress 2.7 introduces a lot of enhancements and one of the major improvements of this new version is the new comment functionality. In WordPress 2.7, comments can be paged, threaded, etc. All of these functionalities are built-in but your theme must support it.

Before we proceed with the topic, it is important that you understand that enhanced comments are optional and its default is in the off mode, even after you have done the changes. In order to change the setting, you have to go to Settings –> Discussion panel to turn the feature on.

Strictly speaking, the word “compatibility” is not an appropriate term. The old themes will still work in the new version. The only issue here is that you will need the theme to support the threading, paging and the javascript enhancements.

This makes it important that your theme’s comments be compatible with WordPress 2.7. In order to unlock the potentials of WordPress 2.7’s comments, a couple of theme modifications are needed.

The first step would be to save the file as legacy.comments.php in the theme directory. After this, you have to create a WordPress 2.7-only comments file and save it as comments.php.

The procedure is to check the version of WordPress that has been installed.

In the theme’s functions.php file, add the following code:

This completes the entire procedure.

Leave a Reply

Your email address will not be published. Required fields are marked *

Experience ThemeMask

View a mask:

Get the masks now!


Theme runs on
Elegantthemes Chameleon