Forums

have_comments() always returns false (2 posts)

  1. SportyAlana
    Member
    Posted 1 year ago #

    Hi there this is my first ever post here!

    I'm trying to do the comments for my custom theme for WP3 and can't get the comments to show. When I activate the TwentyTen theme I can see the comments fine, so it's got to be me doing something stupid.

    I've narrowed it down to have_comments() always returning false, even when get_comments_number() returns an integer greater than zero. Also, it seems that wp_list_comments() does nothing in this instance too.

    My comments code appears to be within the loop, so I was wondering if you had any tips as to what I might be doing wrong?

    Thanks in advance!

    Alana.
    xx

  2. SportyAlana
    Member
    Posted 1 year ago #

    I just worked out what I was doing wrong.

  3. SportyAlana
    Member
    Posted 1 year ago #

    My single.php file included the comments with this line...
    <?php include( TEMPLATEPATH . '/comments.php' ); ?>

    and it should have been...
    <?php comments_template(); ?>

    Now, everything works!
    I hope this helps someone else.

    Alana.
    x

Topic Closed

This topic has been closed to new replies.

About this Topic