WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Exclude comment from list (4 posts)

  1. levani01
    Member
    Posted 5 years ago #

    Is there any way to exclude comment from comment list?

  2. Pinoy.ca
    Member
    Posted 5 years ago #

    Mark it pending?

  3. levani01
    Member
    Posted 5 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 5 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

Tags

No tags yet.