Comment Hilite

rp–comment–hilite is a WordPress plugin that allows you to highlight the significant and noteworthy comments posted on your WP blog. This utilizes custom fields for denoting which comments are to be highlighted.



  • PHP4 (version 4.0.6 or higher)
  • MySQL (version 3.23.23 or higher)
  • WordPress 1.5-strayhorn (or higher)

The plugin version has been tested on WordPress 1.2-mingus, and WordPress 1.5-strayhorn, and should work with other releases from the same codebase.


1.2 (April 26, 2006)
Added the function rp_comment_hilite_count() for counting highlighted comments. (Thanks Ivan Sagalaev.)
1.1 (February 23, 2005)
Updated for WP–1.5, added option to highlight comment from within the entry pages. (Thanks ckozus.)


  1. Unzip the package in an empty directory.
  2. Drop rp-plugin-comment-hilite.php in your wp-content/plugins/ and activate.
  3. To use, use the function rp_is_comment_hilite() in wp-comments.php to display anything you want for highlighted comments.
    	<?php if (rp_is_comment_hilite()) { ?>
        <?php } ?>

    The way I use it, I just add a noteworthy class to a highlighted comment.

  4. To indicate which comments should be highlighted, just add a custom field called comment-hilite, with comma–separated–values containing the ID of the said comments.
  5. You may display the number of highlighted comments for a given entry using the function rp_comment_hilite_count(), which returns (not echo) the said count/number.
  6. For WP 1.5+ users only, you may add the link to highlight the comment from the entry pages, provided you are logged in. This is similar to the “Edit This” link. Use the function rp_comment_hilite_link() in wp-comments.php to highlight comments. Place the link preferably right after the

    <?php edit_comment_link('e','',''); ?>


       <?php edit_comment_link('e','',''); ?>
       <?php rp_comment_hilite_link('h','',''); ?>


Listed below are the functions made available for use by this plugin.

<?php rp_is_comment_hilite(); ?>
Returns (not echo) true if the current comment in the “loop” is highlighted; otherwise false.
<?php rp_comment_hilite_link(); ?>
Prints (echo) a link to highlight the current comment directly. Works in WP-1.5+ only.
<?php rp_comment_hilite_count(); ?>
Returns (not echo) the number of highlighted comments, 0 if none.


Questions and suggestions regarding this plugin may be posted on this site, just as you can email me at markku at rebelpixel dot com. However, because of the volume of email I get everyday, I cannot guarantee a reply, or an immediate one if ever I decide to.

The author may also install or customize the plugin for you, or any WordPress–related issues in general, as a paid service. Just email the author at the same address above for more information.


CC-GNU GPL Copying, modification and redistribution is allowed under the terms of the GPL, better explained by the CC–GPL (Creative Commons Deed). If you found this hack useful, don’t hesitate to link to my site and the projects’s page.