sans-serif   serif

«

Getting comments to display on home page of a WordPress site

December 29, 2009

To get your comments to display on the home page, front page, index page–whatever you want to call it–you have to first force the comments_template to believe there are comments. Somehow it is already being forced to believe that because it is the homepage there are no comments.

<?php $withcomments = "1"; comments_template(); ?>

Now whether it’s being viewed from single.php or index.php or a custom front page, it’ll show the comments.

I did this because I totally tweaked WordPress to be a CMS + product catalog. The comments are simply product inquiries that never display, just notify the site admin. Pretty slick. Typically it’s a bad idea if your site generates much feedback on a post.

Related Posts:

  • No Related Posts

Comments

blog comments powered by Disqus

Comments RSS