Forums

[resolved] Comments on normal pages (4 posts)

  1. Leo12
    Member
    Posted 5 years ago #

    Hi there,
    How can I allow comments on normal pages?
    I've already allowed them when creating pages but the comments area is not showing up
    And it's not only with my template.

    Thanks.

  2. scotter
    Member
    Posted 5 years ago #

    Leo12,

    If you haven't got it yet:

    You can edit the page.php file (most people suggest making a page template and selecting that template for each page you want comments on).

    <?php } // End the Loop ?>
    <?php comments_template(); ?>
    </div> <!-- #primarycontent .hfeed -->

    I added the middle line (taken from comments.php if I remember) in between (the other lines where there).

    I have comments on my 'pages' now. Though I still can't figure out how to get the 'published by' meta info... I can't find that include...

  3. Leo12
    Member
    Posted 5 years ago #

    Thank you very much!

    Try searching something on the post function like "author"... =D

  4. lexhair
    Member
    Posted 5 years ago #

    I would suggest making a slight change to the code by checking to see if comments are allowed when the page is written (there is a check box for allowing comments when you write a page). Toggling the check box will toggle the comments box on the page.

    <?php if (comments_open()) comments_template(); ?>

Topic Closed

This topic has been closed to new replies.

About this Topic