Personal Blog, WordPress

Enable Comments on WordPress Pages

It has been a week ago since I’ve transformed my site into a WordPress Blog site. Because I want to customize everything, I searched the whole site of mine to look for candidates for customization. Now I’ve noticed that wordpress pages don’t have comments, like the about page.

enable-comments
enable-comments

I tried to enable it on Comments and Pings and checked Allow Comments, but it still doesn’t work. Now I’ve searched the internet (the term Google Kung Fu by AJ Batac from phpuhph) and found these topics:

By the way here is the Google Kung Fu: http://www.google.com.ph/search?hl=en&rlz=1G1GGLQ_TLPH303&q=wordpress+enable+page+comments&btnG=Search&meta=

And the topics found:

Here is the content of the topic:

//All you need to do is edit the “Page Template” and insert the following code
<?php if ((‘open’ == $post-> comment_status)) { comments_template(); } ?>

//somewhere in between the following two lines. 

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php endwhile; endif; ?> 

Just go to your theme editor, click Page Template: page.php and then do the code above.

However, I put if first on the top, just after the while (have_posts()) thing. The result was, the comment box appeared on top of the page. So I immediately placed them just before the endwhile code.
Now it works smoothly.

Leave a reply

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