Getting Comments to Display on Home Page of a WordPress Site
By Ryan Florence, published 2009-12-29
Part of the issue Migrated Articles From Original Site Structure..
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.