Support » Fixing WordPress » comments on “pages”

  • when i create a page there’s no comment form on it. i put the code below to page.php but it didn’t show any comment link or else.
    how can i do this?

    <?php comments_popup_link(‘no comment’, ‘1 comment’, ‘% comments’); ?>

Viewing 7 replies - 1 through 7 (of 7 total)
  • Your template must have this to display comments/comment form in The Loop:

    <?php comments_template(); ?>

    thanks

    I put mine here in the page.php file
    <?php endwhile; endif; ?>
    <?php comments_template(); ?>
    <?php edit_post_link(‘Edit this entry.’, ”, ”); ?>

    and it works fine 🙂

    what if you want to add it to a non-looped page like my gallery page which still uses the require wp-header.php include?

    <?php comments_template(); ?> i dont think this works?

    i’m pretty sure it needs to be added within the loop to work.

    what if your page isn’t using a loop? ie a totally seperate page like my gallery?

    I guess you could always try to add a loop to it.
    Something along the lines of:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php endwhile; endif; ?>

    ¿? I don’t know if this should or would work… Add it to your gallery page template and try to see if it works.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘comments on “pages”’ is closed to new replies.