WordPress.org

Ready to get started?Download WordPress

Ideas

Allow comments on Pages

  1. satoridork
    Member

    12345

    I'd like the Page template to have the ability to post comments included by default, with an option to allow / disallow on a page to page basis.

    This is an ongoing problem / annoyance for WP users. Search the Support forum for " Allow comments on Pages" and see how many pages are filled with peeps either wanting to do this, or having problems doing it!

    Posted: 7 years ago #
  2. We can only control the default theme (which would be easy enough to change). Besides that, it's up to theme developers to add comment forms to their pages or not.

    Posted: 7 years ago #
  3. lunabyte
    Member

    12345

    It's a theme issue, not a core issue.

    It isn't that to add the tag to call the comments template into the page template. My daughter could do it, and she's 9.

    Posted: 7 years ago #
  4. Jon Bourne
    Member

    12345

    Well, my daughter couldn't do it, but she's only two! :) This is already in the core, so it is up to theme designers or site owners to put the code on their sites.

    Posted: 7 years ago #
  5. lunabyte
    Member

    12345

    Exactly. Isn't that what templates are for? To customize?

    Posted: 7 years ago #
  6. viitoria
    Member

    12345

    The option's supported already, like everyone else said.

    Posted: 7 years ago #
  7. hm2k
    Member

    Funny, everyone says its possible, no one says how to do it...

    Posted: 7 years ago #
  8. dominicwa
    Member

    You need to edit the page.php file for your theme and insert the following: <?php comments_template(); ?>

    In the default theme it slips in best just before the close of the <div id="content" class="narrowcolumn"> tag on line 17 (I'm looking at theme version 1.6).

    That's all there is to it. You might also want to edit the comments.php file of same theme and add <?php if (!is_page()) { ?> before the line that reads <!-- If comments are closed. --> and <?php } ?> after it. (It's around line 57/58, again in default theme version 1.6.) This'll stop the "Comments are closed" message from appearing on pages which to me doesn't quite fit given the context.

    Hope that helps someone given this was 2 months ago. Took 2 minutes of my time and is a darn sight lot more useful than the earlier "It's easy but I ain't gonna share" attitudes :/

    Posted: 7 years ago #
  9. Tobeon
    Member

    Thank you very much! It was very helpful :)

    Posted: 7 years ago #
  10. Thanks for that dominicwa - so simple when you know how !

    Posted: 7 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.

  • Rating

    12345
    130 Votes
  • Status

    This idea has been implemented