How to enable comments on WordPress Pages?

You can use wordpress as a simple Content Management System for a non-blog website. That’s what I am doing on one of my other websites. But I wanted to enable comments on my static pages. I figured just by enabling “Allow comments” under “Discussion” did not work. Then I found this wordpress.org thread

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; ?>

0 comments ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment