WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Adding Comments to Pages

[Resolved] Adding Comments to Pages

  • This is my website in progress: http://www.rj3labs.com

    Right now, I’m having a hard time getting comments to work on the static wordpress pages (Write –> Write Page)

    The “Allow Comments” button IS checked under discussion.

    Look at the “Test” page for an example of what I’m talking about. It’s not a theme thing either, because I can switch to default and it still doesn’t work.

    Thanks for your help.

    Russ

Viewing 15 replies - 1 through 15 (of 27 total)
  • Static Pages are static. Comments are for posts. I may be wrong, but I don’t believe you can add comments to static pages (and that’s by default). There might be a plugin or something – but i don’t think so.

    You could swap out the Pages and turn them into specific post categories – then you can have the comments function active. That’s an option for you.

    Actually, you can.
    You just need a page template that calls for the comment template as your single.php and/or index.php does.

    Locate following code in page.php [template file]

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    <?php endwhile; endif; ?>

    In between these lines add following:

    <?php comments_template(); ?>

    pramodd, thank you very much! I’ll make this a post on my site so others can know.

    Russ
    http://www.rj3labs.com

    but what about if we only want it on one page?

    Make two Page templates, one with comments and one without. Read more about Page templates at Pages in the codex.

    I did as described above with the default template page.php.

    Comments field and side bar show fine. BUT after the first comment is left, the side bar disappears and no comments show, just the notice that there is one response.

    I tried this and worked:

    <?php if ((‘open’ == $post-> comment_status)) { comments_template(); } ?>

    Just to throw my hat in here, this works great for me. Thanks everyone!

    godofcomics

    @godofcomics

    works here too, awesome.

    @elekaeme

    Thank you. That woks wonderfully. 🙂

    Thank you for being clear for us numpties!

    @elekaeme

    Thank you, this seems to have worked for me as well.

    Also, if you want comments on one Page only, then simply uncheck the Allow comments option when in the Manage Page screen.

    Thanks… exactly what i’ve been looking for.

    Thanks… I had been trying to fix this for a while until I found this thread. It works.

Viewing 15 replies - 1 through 15 (of 27 total)
  • The topic ‘[Resolved] Adding Comments to Pages’ is closed to new replies.
Skip to toolbar