How to hide (or not to show, better said) trackbacks on wp-admin/edit-comments.php page?
I want to hide the comments with no email (also known as trackbacks) and comments with a specific email from the edit-comments.php page.
How to hide (or not to show, better said) trackbacks on wp-admin/edit-comments.php page?
I want to hide the comments with no email (also known as trackbacks) and comments with a specific email from the edit-comments.php page.
You must be logged in to post a comment.
While this is not impossible, this is very likely to have ton of edge cases and backfire in some. In a nutshell comments are retrieved with comment query, which can be adjusted with something like this (if in admin and comment type not specified then only fetch normal comments):
However the problem is “any comment query in admin” is too broad and there isn’t much it can be narrowed down by.
Overall I would not recommend to mess with this.
PS excluding by author is not supported by native arguments and would be even more tricky with need to filter SQL.
To only show comments on the comments page.
Above the list there are 2 dropdowns one has the option to only show comments.
I checked the file which builds the data:
class-wp-comments-list-table.php
And the functionprepare_items
. It has no filters or actions to hook into.As far as I can tell there is no way to disable trackbacks from showing.
Nor is excluding certain emails.
If you really want it you would have to copy the comment screen, and edit that.
I can help you get started with that if you want.