WordPress.org

Ready to get started?Download WordPress

Forums

Not displaying Comments (8 posts)

  1. lust_and_anger
    Member
    Posted 8 years ago #

    Hey. I'm sorry if this has been answered before, but I couldn't find it anywhere.

    Basically, if you look http://imaginaryroots.org/content/blog/?p=54#comments here for example, you will see it advertises there are 2 comments on the post, which there are, as I have moderated them. However, just below that, it says there aren't any. I haven't touched the code that displays the comments, however, when I upload the original theme (I have modified mine, as you can no doubt see), it seems to work fine.

    Any thoughts?

  2. Can you upload you theme's php files somewhere to look at - it looks like something wonky in your theme if they work with the default theme.

  3. lust_and_anger
    Member
    Posted 8 years ago #

    http://imaginaryroots.org/content/blog/comments.txt <- The comments file

    http://imaginaryroots.org/content/blog/index.txt <- The main page

    These are the only files I've played with, bar the Header and Footers which contain no (or at least nothing important) PHP code. I've looked through these pages, but I couldn't spot anything, hopefully you guys can :)

  4. Ok.

    This looks fairly easy to solve I think.

    Change line 11 of comments.php from:
    <?php if ( !$comments ) : ?>
    To:
    <?php if ( $comments ) : ?>

    You have inadvertently negated the logic of the If check so that if there are no comments it will try and display them and if there are comments it will display the no comments message!

    hope this helps

  5. lust_and_anger
    Member
    Posted 8 years ago #

    Yeah, I was trying something, then forgot to upload the edited file. lol

    That's been ammended, but the problem persists. Any other thoughts?

  6. eragle
    Member
    Posted 8 years ago #

    Okay, just throwing this out there. Try this:

    1. Save a copy of your comments.php to your hard drive.
    2. Replace this
    '< p > <?php _e('No comments yet.'); ?> < / p>

    With this
    <?php if ('open' == $post-> comment_status) : ?> `

    If it doesn't work just upload the php file you saved to your hd and I'll start over. Oh yeah, remove the

  7. eragle
    Member
    Posted 8 years ago #

    Nevermind that last part, the forum formatted my post funny.

  8. lust_and_anger
    Member
    Posted 8 years ago #

    No luck I'm afraid.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.