I found so many information and most of the tutorials only talk about adding filter in post/custom post only.
I want to do something similar to this tutorial in ‘Comments’ area in admin panel.
Add filter menu to admin list of posts (of custom type) to filter posts by custom field values
However, I’m not sure if the parse_query handle also handle the query in this area?
Anyone might have suggestion on tutorial, plugin that might help?
Working Example [Update]
From this Answer, by @TheDeadMedic, here’s an adaptation to show only comments from a specific
post_id
. A link to this action is inserted in the status row.Hello World
is the post with ID 53.When clicked it displays only the comments of that post in the URL
example.com/wp-admin/edit-comments.php?comment_status=all&hello_world=1
:Useful Hooks
Search for the hooks bellow, they are available in the file
/wp-admin/includes/class-wp-comments-list-table.php
.It’ll give you a panorama of the possibilities for the Comments screen.
Actions
manage_comments_custom_column
manage_comments_nav
Filters
comments_per_page
comment_status_links
admin_comment_types_dropdown
comment_edit_pre
comment_row_actions