[resolved] Exclude comment from list (4 posts)

  1. levani01
    Posted 6 years ago #

    Is there any way to exclude comment from comment list?

  2. Pinoy.ca
    Posted 6 years ago #

    Mark it pending?

  3. levani01
    Posted 6 years ago #

    No the status should stay the same but the comments shouldn't be visible in comment comment list.

    I have a comments rating system on my site and would like to show one most popular comment right bellow the post and than other ordinary comments. But I don't know how to exclude the comment from the list.

    Can anyone help?

  4. esmi
    Forum Moderator
    Posted 6 years ago #

    You'd first need to figure out a way of identifying most popular comment, using code, so that it can be displayed/skipped as appropriate. Then you'd need to write a custom comment callback in functions.php that can be called in comments.php using <?php wp_list_comments('callback=my_custom_comments'); ?>.

    The custom comment function could then list, or omit, comments based upon any conditional you care to use.

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.