Comments on index page to show on one post only (2 posts)

  1. bridges2610
    Posted 4 years ago #


    I have a site that enables comments on the homepage. The problem is, when you click comments, all of the comments on the homepage open up. I just need the comments for that particular post to open. Can someone give me some assistance? The url is: designseedz.com

    Thanks in advance!

  2. K-Fella
    Posted 4 years ago #

    I see you're using jQuery to toggle comments for each post.

    The problem with your code is that the click function is set to toggle divs with the .comment-wrapper class.

    Seeing as each post has it's own comment-wrapper class, clicking any of the comment links will open all comment divs.

    What you need to do is give the comment list for each post a unique id.

    Then use jQuery to toggle the comments for that post only.

    This might help:

    Have fun =)

Topic Closed

This topic has been closed to new replies.

About this Topic