Support » Plugins and Hacks » show and hide individual comments

show and hide individual comments

  • Hello,

    I was wondering if anyone knows how I can show and hide individual comments instead of hiding the entire comment block. For example, if I have multiple comments on one post all the comments would be hidden by default displaying only the titles and dates but no content. There would be a toggle link that when clicked on would hide and show the content of that individual comment.

    I have tried to use some of the ajax plugins available but they only show and hide all comments. I have also tried my amateurish hand at JavaScript but I was only able to get the first comment to hide and show. Hope this is clear.

    Thank you in advance for your help.


Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

    I was just wondering if anyone could point me to right direction here. Thanks again.



    Still wondering… Thank you. Happy Thanksgiving

    I’ve been wondering the same thing. It seems like this would be one approach:

    1. Create a new function that sets an individual comment status to ‘hidden’, or maybe sets comment_approved to the value 2 (I think normally it’s 0 for not approved and 1 for approved).

    2. In comments.php, create a conditional statement that skips the display of ‘hidden’ comments: “if $row[‘comment_approved’] is 2, then don’t display this comment.”

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘show and hide individual comments’ is closed to new replies.