WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Comments not showing in post (10 posts)

  1. FKGO
    Member
    Posted 1 year ago #

    Dear WordPress-community,

    I have been working on this site to try to get the comments to work, but it doesn't. I want them to appear after a post. I have created everything which is needed for a comment to appear and it all works: when commenting on a post, I can see it in the admin. However, I cannot see it on the page itself. Where is my mistake and does anyone have a solution? Thanks in advance!

  2. Ryan Yu
    Member
    Posted 1 year ago #

    Hi FKGO,

    Can you post the url having the issue?

    Also have you checked if the "Allow comments" is ticked?

  3. FKGO
    Member
    Posted 1 year ago #

    I have checked and it is ticked. My apologies for not including the url, here it is: http://www.bananaweb.nl/wubboockelsprijs

  4. Ryan Yu
    Member
    Posted 1 year ago #

    Have you received my test comment from this page?
    http://www.bananaweb.nl/wubboockelsprijs/bidbook-online/

    If so, can you double-check if it is placed in a queue for moderation?

    Also can you open single.php in your theme folder (you will need to FTP), and see if you can find the code something like below?

    <?php comments_template(); ?>

    and if there is a file called comments.php in your theme folder?

  5. FKGO
    Member
    Posted 1 year ago #

    These files exist and are in place. I have also noticed your comment; it did not need approval or anything. The problem probably lies deeper and I have no clue. I also tried working with the get_comments and list_comments codes, but they did not seem to be working (though to be honest, I have not tried them lately).

  6. Ryan Yu
    Member
    Posted 1 year ago #

    That's interesting!

    Can you post the code from comments.php? You can use http://pastebin.com/

    I want to see if there is any error in your code because the comment form is appearing ok, but not the list of comments.

  7. FKGO
    Member
    Posted 1 year ago #

    Here is the link to the comments.php code on the Pastebin.

  8. Ryan Yu
    Member
    Posted 1 year ago #

    It seems you need to assign a value to $comments_by_type.
    So add this

    <?php $comments_by_type = &separate_comments($comments); ?>

    right above

    <?php if ( ! empty($comments_by_type['comment']) ) : ?>

    Let me know how it went.

  9. FKGO
    Member
    Posted 1 year ago #

    It works perfectly now, thank you very much!

  10. Ryan Yu
    Member
    Posted 1 year ago #

    Good to hear it was resolved!

Topic Closed

This topic has been closed to new replies.

About this Topic