• I want to have comments on my posts and on my pages, but the link does not appear on the pages. Both my index and pages files use this code in the loop:

    <?php comments_popup_link(__(‘Comments (0)’), __(‘Comments (1)’), __(‘Comments (%)’)); ?>
    <?php edit_post_link(__(‘Edit This’)); ?>

    On the index page the comments link is there, but on the page it is not. The page does have both comments and pingback checked, so I cannot fathom why the comments link does not appear. The Edit link does appear.

    https://www.rsart.co.uk/ works
    https://www.rsart.co.uk/?page_id=48 doesn’t

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter rickstirling

    (@rickstirling)

    I have noticed that this works:

    <?php comments_template(); ?>

    When I add it, I get the edit box – but I want to send the reader to the comments page instead.

    There is no “comments page”.
    Posts and Pages work in the same way: if the comment template is called (with the code you just discovered ?? the comments and the comment form will be displayed under the content when viewing a single post. Since Pages can be viewed ONLY as “single” – you will have the comments underneath.

    Thread Starter rickstirling

    (@rickstirling)

    Ah! So I HAVE to have them ??

    Right, I’ll stick that back in, thanks!

    Thread Starter rickstirling

    (@rickstirling)

    Worked a treat.

    For others – if you add that, it appears on every page, even with comments switched off.

    I copied my page.php file, renamed to commentspage.php and put this at the top:

    <?php
    /*
    Template Name: COMMENTSON
    */
    ?>

    Then I uploaded, and edited the COMMENTSON template to include the <?php comments_template(); ?>

    Then on my page where I wanted comments, I changed the template (Manage, Pages) to the COMMENTSON template.

    You are a fast learner ??

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Comments – works on posts, not pages.’ is closed to new replies.