WordPress.org

Forums

How to add comments to a Page? (9 posts)

  1. lewisjfish
    Member
    Posted 6 years ago #

    Hey, I'm a newb to wordpress and I've been trying to figure out how to add comments to a page, not a post. I've found a few pages on the web pointing me to use: <?php comments_template(); ?>

    I used added this to my page template (page.php) just before <?php endwhile; ?> and then went to see what had happened. On my page, the comments box had appeared, so I tried to add a comment. Once I clicked "Leave Comment" it seemed to just refresh the page, nothing had changed. I checked on my admin dashboard and the comment had been posted, but there is no way of looking at the comment other than through the admin dashboard. Does anyone know how to add a page with all the comments?

    I'm sorry if this is a trivial question, I'm a wordpress newb. :P

    I'm using the Pixeled theme.

    Thanks for your help. :)

  2. Samuel B
    moderator
    Posted 6 years ago #

    put this
    <?php comments_template(); ?>
    directly after
    <?php the_content(__('(more...)')); ?> (yours may look a bit different)
    in page.php

  3. lewisjfish
    Member
    Posted 6 years ago #

    I found that, put it right after <?php the_content('(continue reading...)'); ?> and changed the font colour to white (which is great, thank you!) but it still just refreshes the page and doesn't show any way to look at comments of the page unless you goto the admin dashboard; something a regular user cannot do.

    How can I get it to either:
    1. Make a comments page and redirect to that page once the comment is posted.
    2. Post the comment onto the page where the comment form is?

    Thanks for your help.

  4. elisean
    Member
    Posted 6 years ago #

    Just used this theme and I have the same problem. Did the t/s step. Comment didn't post. Even the old comments that were imported from an old WP blog doesn't appear :( Anyone got a solution for this?

  5. elisean
    Member
    Posted 6 years ago #

    I figured half of it out. I'm running WP v.2.7.1. Instead of

    <?php comments_template(); ?>

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

    directly after
    <?php the_content(__('(more...)')); ?>
    in page.php.

    My comments are now up but the new ones won't post unless I do a threaded reply :p

  6. Ry99
    Member
    Posted 6 years ago #

    Hey I'm trying to do this same thing... did you guys find a solution? I'm thinking how does WordPress know what to post the comments to? Because normally it would post them using the post ID right? So how do you post the comment to the page?

  7. dhin
    Member
    Posted 6 years ago #

    I have tried this but my page like this

    I put this code

    <?php //if page is split into more than one
    link_pages('Pages: ', '
    ', 'number'); ?>
    			     </div>
    <?php comments_template('', true); ?>

    Is dit correct to put the code
    <?php comments_template('', true); ?> ?

    I have tried below and above the <?php endwhile; endif; ?>, still the same result
    Also tried another plaats, still the same problem

    Please help me

    Thank you

  8. dhin
    Member
    Posted 6 years ago #

    Work thank you

  9. immanueln2005
    Member
    Posted 5 years ago #

    @samboll

    Thanks... Exactly what i needed...

Topic Closed

This topic has been closed to new replies.

About this Topic