1. You can use pre_get_comments
hook:
add_action('pre_get_comments', function($query)
{
global $pagenow;
if ( is_admin() && ('your-custom-page' === $pagenow) ) {
$query->query_vars['meta_query'] = [
'relation' => 'AND',
[
'key' => 'key1',
'value' => 'meta1'
],
[
'key' => 'key2',
'value' => 'meta2'
]
];
}
});
2. You need to learn how to create an admin list table.
Also, take a look at:
Related Posts:
- How to filter users on admin users page by custom meta field?
- is it possible to add “extra” table nav to edit-tags.php screens?
- What hook do I use to edit the post statuses option in admin?
- post_mime_types Filter not Working in List Mode
- How to limit the pages displayed for choosing parent page on page attribute’s menu?
- WordPress Rest filter for custom taxonomy gets applied to the admin area
- user_has_cap filter allows edit but will not allow save
- Changing Gutenberg / WP block editor width only on pages, not posts or other taxonomies
- Why my admin doesn’t work after adding rest_prepare_post filter?
- Add Sortable Column For All Post Types
- How to add ‘total’ value to custom column title on the posts list page
- views_edit-post filter not working (custom post type)
- Filter pre_get_posts does not modify Mine/All/Pending
- Prevent add_filter being applied to wp-admin pages
- How to add attributes to WordPress Admin Sub Menu List Items
- Media upload default title from file name
- Admin post list – adding an option to the date filter dropdown
- How to replace username with email address in users table
- Hide Posts In Back-end/Admin Based On User’s (Pseudo) Privileges Controlled by ACF
- Filter Pages by Custom Field (ACF) in admin area
- Use has_filter on comment_post
- Echo string in admin panel footer beside version no
- How can I edit comment meta value before it is saved?
- Filter / add_action to upgrade.php page
- How to filter with dropdown in backend for custom data
- How do I add tags to entire comments, not just their text
- Having wp-admin on different domain
- WordPress: Issue with filtering users using date range
- How do I disable the warning “The backup of this post in your browser is different from the version below”?
- How to influence the information displayed on widget inside wp-admin
- Custom theme hooks / filters – passing arguments
- What params are available with the_content filter?
- How to hook wp_list_pages?
- Don’t replace “|” with Empty String (“”) when generating slugs from title
- apply_filters(‘the_content’, $content) alternative
- Changing document title only on a custom page template
- Add filter to wp_dropdown_pages() or wp_dropdown_categories() – no select container?
- Hook different functions to the same filter conditionally OR Pass additional arguments to existing filter?
- How do I pass the value from a foreach loop to an add_filter function? [closed]
- Search results sorted by post types
- Pass parameter to the upload_dir filter
- Filter or Hook to catch pre-rendering of post content
- check to see if hook is available
- Filter users by custom colum not meta key
- How to allow users to view pending posts of a specific custom post type?
- Remove filter callback: method in class
- How can I exclude tags from category_rss function?
- How to filter meta_values using REST API
- How do I use remove_action on an add_action that uses an array?
- Change the default 10-day expiration for the password protected pages cookie
- Add content as soon starts
- Access get_the_title() from ‘excerpt_length’ filter
- Wrong post_status notice after wp_insert_post_data
- Adding a Clone link to product attributes – post_row_actions() filter, or how to override a Class question
- wp_upload_bits Upload Specific Sizes Only
- Woocommerce “added to cart” message on main(home) page
- Why does adding a filter to ‘the_title’ break the server?
- Add filter for specific post type only
- Avoid user registrations with specific email provider
- Should I remove_filter in order to replace a filter?
- Change custom post type GUID in RSS
- How can I specify the post status of an untrashed post?
- filter hook to load a different post/page on current post/page
- How would I be able to use a font awesome icon as a user’s avatar?
- Add something after a filter
- Rewrite rule and display of post
- add_filter the_content doesn’t work
- Redirect to woocommerce checkout after adding to cart – item already in cart
- Passing variable from child theme function to parent theme filter
- `authenticate` filter never gets called
- How to disable a wp filter in a certain admin panel page
- Is there a filter to programmatically change the HTML tab switching output of the page editor?
- Why does admin_body_class not work?
- post_orderby filter breaks function
- Disable Remember Me in Login Form
- How do I add a line break to a string that is output by PHP?
- Counting a WP_Post Object value in an arary, using a filter?
- List all categories that have results in a query
- Distinguish between page and post in function
- Display posts from today and future in Elementor ‘posts widget’
- Right filter for rewriting page statuscode
- Changing title using filter not working with argument
- How to filter page title for certain page?
- How to disable sub menu items from being created?
- Displaying posts on a page that have been assigned a value in a database
- Replace Text with hyperlinks
- adding an action inside if condition not working
- Adding filter to an specific page/site direction
- How to filter wp_get_recent_posts() to only posts that have thumbnails?
- Change add_filter based on Ajax
- How to check which submission button was clicked?
- check, if any “add_action” function contains string XXXXXXXXX
- Joining tables not working in the post editor page
- Auto append text after the title?
- Filter and manipulate the get_current_user() function
- add_filter(‘the_content’, ‘method’) does not trigger my custom method
- Using two posts_orderby add_filter makes conflict
- How to correctly override a filter?
- Is there a way to check if the ‘wp_sitemaps_enabled’ is true or false?
- Block Gutenberg Editor manually by User Roles with a Filter with code