Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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'
- ]
- ];
- }
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement