Comments on Pages

Discussion in 'WordPress' started by mpak11, May 10, 2008.

  1. #1
    The theme that I got for my hosted wordpress blog does not have the option to " leave a comment " on pages. Is it possible to enable this?
     
    mpak11, May 10, 2008 IP
  2. doyi

    doyi Guest

    Messages:
    210
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You can open the file named page.php and add the following code after the loop:
    <?php comments_template(); // Get wp-comments.php template ?>
    HTML:
    . You may need to mov it around a few times depending on where you need it to display.
    for loop visit
    http://codex.wordpress.org/The_Loop
    Code (markup):
     
    doyi, May 11, 2008 IP
  3. doyi

    doyi Guest

    Messages:
    210
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Or Just do this


    Just add after
    <!--end of article-->
    Two lines:

    <!--opens comments.php-->
    <?php comments_template(); ?>

    that's all :)
     
    doyi, May 11, 2008 IP
  4. System0

    System0 Well-Known Member

    Messages:
    168
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    128
    #4
    <?php comments_template(); ?> is the correct code to add but remember to compare your page.php file to your single.php page so that you use the same classes etc to style the comment area (eg. make sure they are the same so that the comment section is consistent with the rest of your theme)
     
    System0, May 11, 2008 IP
  5. mpak11

    mpak11 Guest

    Messages:
    234
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks a lot guys!
     
    mpak11, May 11, 2008 IP