How to add comments to pages?

Discussion in 'Forum Rules' started by filigree, Jan 1, 2014.

  1. filigree

    filigree New Member

    Joined:
    Jun 8, 2013
    Messages:
    18
    Likes Received:
    0
    Location:
    Oregon
    Hi,
    I am having trouble figuring out how to add comments to pages (not posts). I have "Allow comments." checked on the page, but there is no comment box showing up. I also have the "Discussion Settings" all set up.
    Any help you can provide on setting up comments on pages is much appreciated! (I'm using the "Colorways" theme)
    Thank You!
    Jasmine
     
  2. Gourav

    Gourav Support Staff

    Joined:
    Oct 19, 2012
    Messages:
    7,728
    Likes Received:
    207
    Hello,

    Go to page.php present in your theme directory and add the code given below

    Code:
    <div class="comment_section">
                        <!--Start Comment list-->
                        <?php comments_template( '', true ); ?>
                        <!--End Comment Form-->
                  </div>
    Check image for reference

    2014-01-02_1345.png

    Use same process for template-fullwidth also.


    This will solve your issue.


    Thanks & Regards
    Gourav Shrivastava
     
  3. filigree

    filigree New Member

    Joined:
    Jun 8, 2013
    Messages:
    18
    Likes Received:
    0
    Location:
    Oregon
    Thanks so much for your help! It works perfecctly.
    Can you please tell me how to only have the comments show up on specified pages? I tried turning the comments off on a page and a caption appears saying "Comments are closed". Anyway to turn this off and not have comments show up on certain pages?
    Thanks Again!!!
     
  4. Piyush

    Piyush Support Staff

    Joined:
    Dec 8, 2012
    Messages:
    4,745
    Likes Received:
    107
    Hello,

    Through page id selector you can apply css style code only for specific pages.

    Firstly go to the Pages > All Pages in your dashboard and hover the edit option of that page from which you want to remove the comment section and copy its page-id number.

    See the image for reference
    [​IMG]

    Now, add that page id in the css code given below( current page is 2)
    after that paste the code given below in Custom CSS section
    (Appearance -> Theme Options -> Styling Options -> Custom CSS) of your dashboard.

    Code:
    .page-id-2 .comment_section {
    display: none;
    } 

    This will solve your issue.
     

Share This Page