[resolved] Turning off comments on pages. (5 posts)

  1. PatrickBeuken
    Posted 9 years ago #


    I know that it is possible to turn off the comment function for the whole weblog, but i'd like to turn off this function only for pages. Is this possible? So it still has to be possible to comment on normal blogs...

  2. Mark (podz)
    Support Maven
    Posted 9 years ago #

    It is certainly possible.
    Download the 'index.php' from your theme to your computer
    Rename it to 'page.php'
    Open it in Notepad / Wordpad / BBedit or similar
    Remove these lines:
    <div class="feedback">
    <?php wp_link_pages(); ?>
    <?php comments_popup_link(__('Comments (0)'), __('Comments (1)'), __('Comments (%)')); ?>


    <?php comments_template(); // Get wp-comments.php template ?>

    Save it, upload to the theme directory and that should do what you need.

  3. PatrickBeuken
    Posted 9 years ago #

    Well... Actually it works! But at one of the pages i'd like to have a comment-option (a page wich is used like a guestbook). Is it possible to have the comment option on only this page and not at the others?

    Thanks voor your help!

  4. moshu
    Posted 9 years ago #

    You can have (and create) as many Page templates as you wish. See Pages#Page_Templates
    In some of them you can leave the reference to comments, in other you can take it out.
    When writing a new Page, you just have to choose the template you need for that specific Page. (Note. If you have more than one Page templates, a dropdown menu will appear in Write > Write Pages to pick a template.)

  5. PatrickBeuken
    Posted 9 years ago #

    Thanks! I never thougt about this function...

    WordPress is really cool and the response time of the support is really great!

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.