Forums

Comments link doesn't work with default code (3 posts)

  1. traceyrickard
    Member
    Posted 2 years ago #

    Originally I was using the default theme loop in my own theme and in particular the block below:

    <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?>

    When using the default theme, I clicked on no comments under the post and it went through to display the post on its own with the comments input form underneath.

    When using my theme, I clicked on no comments under the post it went through to display the post alone with no comment input form.

    The code in the two themes was identical.

    I have added the following code to my theme and now it displays the comments (if there are any) and the input form below.

    <?php comments_template(); ?>

    My question is why do I need that extra line of code in my theme to show the comments and the comment input form when the default theme does not need that extra line of code?

    I know this isn't what you would call life threatening but it is bugging me...

  2. Rev. Voodoo
    Volunteer Moderator
    Posted 2 years ago #

    <?php comments_template(); ?>

    is in the default theme..... in single.php (is that what you were referring to?)

  3. traceyrickard
    Member
    Posted 2 years ago #

    You have so answered the question! I had the page single missing from my theme which of course is where the correct code is.

    Thank you so much.

Topic Closed

This topic has been closed to new replies.

About this Topic