How to get comments in pages (not just posts) (3 posts)

  1. shawjoej
    Posted 3 years ago #

    I'm using WordPress theme twenty twelve.

    I tried a few statements before the endwhile in the page.php.

    $withcomments = "1";
    comments_template(); // Get wp-comments.php template ?>


    <?php comments_template( '', true ); ?>


    <?php comments_template( ); ?>

    I'm not getting the desired result.

    Any ideas on a code snippet?


  2. esmi
    Forum Moderator
    Posted 3 years ago #

    Do not edit the Twenty Twelve theme. It is the default WordPress theme and having access to an unedited version of the theme is vital when dealing with a range of site issues. First create a child theme for your changes. Or install a custom CSS plugin.

  3. Michael
    Forum Moderator
    Posted 3 years ago #

    Twenty Twelve does show comments in pages by default, if the settings are set to allow comments;

    dashboard - settings - discussion

    dashboard - pages - all pages - quickedit - tick 'allow comments'

    dasboard - pages - edit page - scroll to below the page editor; if there is no discussion field, tick the screen options' tab near the top right, and tick 'discussion'; then scroll down again...

Topic Closed

This topic has been closed to new replies.

About this Topic