Oct
16
How to enable comments to pages in WordPress
∇ Category:Technology and Toys | → 0 Comments |
By default most WordPress themes are not enabled to allow comments on pages. So even if you check the “Allow comments” check box in the DISCUSSION section when creating a page, nothing will happen until you edit your Page template file. You can ether edit it by logging into the the wp-admin site or by editing the file via ssh or ftp.
If you use the wp-admin site, click “Appearance” on the left side of the window to expand the section, then click on “Editor”
Make sure your current theme is displayed on the right hand side where it says “Select theme to edit:”
If it is, then click on the “Page (page.php)”
If you are using the FTP/SSH option go to your wordpress installation directory.
Then navigate to wp-content > themes > {your theme} and edit page.php
Scroll down until you see the following line of code:
|
<?php if (have_posts()) : while (have_posts()) : the_post(); } ?> |
Then add the following line:
|
<?php if ((‘open’ == $post-> comment_status)) { comments_template(); } ?> |
And it should be added before this line:
|
<?php endwhile; endif; ?> |
Subscribe
twitter/dm247


