0

Is it possible to put a button in the comments(front-end) that would show/hide comments that are in spam status in the current post?

1 Answer 1

0

Yes; you can use get_comments() function to query comments and specify spam as the status. Placing the button will depend on your theme, but the below is how to get the comments marked as spam (tested):

get_comments( array( 'post_id' => $post_id, 'status' => 'spam', ) ); 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.