How to Show Comments on the Homepage of Your WordPress Theme

Lately whereas engaged on a really secret venture, we discovered a necessity to point out feedback on the homepage of the location. Usually, on single pages you’ll be able to simply name comments_template(); and it ought to show, however it wasn’t exhibiting up. All we ended up getting was a clean div container. After doing a fast search on-line, we have been capable of finding the reply. On this article, we are going to present you how you can present feedback on the homepage of your WordPress website.

Contained in the loop proper earlier than endwhile, merely add the next code:

$withcomments = "1";
comments_template(); // Get wp-comments.php template ?>

A single line $withcomments makes all of the distinction.

Word: this was a quite simple one web page website we threw up. So the theme components have been type.css, index.php, and feedback.php file. We have been calling a loop to show a particular web page on the index.php file together with different issues.

We hope that this might assist a few of you. A few of chances are you’ll also have a higher method of doing this. For those who do, please share it with us within the feedback.

Download The WPSaviour App Now

Related posts

How To Add Pagination To Your WordPress Theme


9 Things You Should Consider while Choosing a WordPress Theme


The Dilemma Between “Pretty” And User Friendly: How To Pick The Perfect WordPress Theme


Tips for Selling Your WordPress Themes

Leave a Reply

Your email address will not be published.

Pay in your preferred currency
Indian rupee