WordPress is cake to install, so I had an instance running in less than 10 minutes. I edited the included About page that comes with the default install, turned off Allow Comments and Allow Pings, then viewed the page. At the bottom of the page it was still tacking on the comments section:
Ug. I poked around and couldn't figure out how to turn it off, so I resorted to a handy-dandy Internet search and found the solution.
In your theme, you will have a page named single.php, or index.php. Use the editor to view the source code for the page. In the code, the comments template is called with:
<?php comments_template(); // Get wp-comments.php template ?>
Comment that code out:
<!--<?php comments_template(); // Get wp-comments.php template ?>-->
and add this:
Where the comma separated numbers correspond to the page_id.<?
php if(is_page(array(27,32,56))){
//do nothing
}
else{
comments_template();
}
?>
The comment section will still show up on blog posts, but not on any of the pages you identify in the above code.
No comments:
Post a Comment