• I’m doing a charity website, and some pages don’t need comments at all, such as a “Thank you for your donation” page, for example. Having “Comments Off” at the bottom of the page just looks ugly, as well as being pointless, and I’d like to remove it. However, there are also some pages where comments are welcome.

    All of the advice I’ve seen so far seems to be how to remove these words on ALL pages, not on selected ones. Is it simply a case of ‘all on/all off’ or is there any way of being selective?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can create a custom page template without the “Comments Off” php code and use that for the pages where it’s not needed: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates.

    Make a copy of single.php, page.php (or other), edit it, give it a template name, then select it when you make the page in the editor.

    Hey Songdogtech,
    This post caught my attention because I am having a somewhat related problem. I have created a page.php template to use for my ‘About’ page. The problem is that the page.php template does not show up in the drop down list box in the Page section of the admin console. Is there a trick or extra step I have to take to ‘activate’ the template or something?
    Linda

    Lots of time you can activate another theme just for a moment and then switch back to the theme that has the page.php template and it will show up then. And be sure you have the correct code for a page template:

    <?php
    /*
    Template Name: mynewpage
    */
    ?>
    
    <?php get_header(); ?>
    
    (etc...)
    Thread Starter aga1

    (@aga1)

    That’s the answer I’ve been looking for! Thanks, songdogtech!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Hiding “comments off” on some pages, but not all.’ is closed to new replies.