You can filter the query for these keys on'query'
. I would start that filter as late as possible to avoid side effect.
Sample code, tested:
add_filter( 'postmeta_form_limit', 'wpse_73543_hide_meta_start' );
function wpse_73543_hide_meta_start( $num )
{
add_filter( 'query', 'wpse_73543_hide_meta_filter' );
return $num;
}
function wpse_73543_hide_meta_filter( $query )
{
// Protect further queries.
remove_filter( current_filter(), __FUNCTION__ );
$forbidden = array ( 'the', 'keys', 'you', 'want', 'to', 'hide' );
$where = "WHERE meta_key NOT IN('" . join( "', '", $forbidden ) . "') ";
$find = "GROUP BY";
$query = str_replace( $find, "$where\n$find", $query );
return $query;
}
Related Posts:
- So much data in postmeta
- What is the advantage of the wp_options design pattern?
- Remove old custom field after import
- Edit Custom Database Tables in WordPress
- importing data from non-wordpress mysql db
- Register new user and add custom data row value for it
- After moving my site from a dev subdomain, to root, all my custom meta data is gone
- Front-end update_post_meta with ajax
- Advice needed for importing custom field data and database structure
- Leader board for game on homepage
- Which is best in the following scenario : post_meta vs custom table vs parent/child posts
- Default WordPress taxonomy (Tag) – How to add a custom field to form and save it to the database
- Separate table or usermeta
- Custom User Profile Fields
- Get all posts that do not have a specific custom field without using a subquery
- Custom fields not getting saved in the databse when added to the add new user profile page
- Is there any way to get all meta and standard columns for any WordPress object after searching based on meta key and value
- Is there a better way to list all database terms alphabetically?
- Linking Custom Fields to Database Records
- How to populate custom field dropdown box based on prior selection?
- When creating a metabox do you have to create DB fields for the data?
- Limit of char count in WP custom fields
- Adding custom field and querying from post table
- How to copy data from a custom field to the post_content?
- Diamond question mark in text after migrating content
- How do I convert all custom_field php timestamps in the database to js timestamps?
- Getting and calculating averge value of custom fields of the same tag
- How To Save Data From Remote APIs To ACF?
- Retrieving and inserting data in custom fields
- I have a form with a custom button ,i want to add the field data to an database when clicking the custom button
- update_user_meta(): invisible data storage
- Populate a select box with data stored in the database?
- Updating custom fields with external data
- Download stuff after filling fields?
- Website that sells statistics
- How to create a searchable database with a single-field search box at the front end? [closed]
- How can I avoid re-inventing the Custom Fields wheel in my Plugin’s Metabox?
- Using wordpress post data as input for google visualisations
- Assign/update the custom field value for all posts
- Display newest post’s custom field content on homepage, daily
- Loading scripts to the Post Edit page only
- Registration and Profile custom field
- Per site configuration
- Calling custom fields for pages (not posts)
- Add More Fields to Users Pages (Admin Panel)
- how can i use custom field in query post
- Dynamically fill a post custom field with post publish date
- Create new post with meta data using WordPress API
- get_terms that have custom sticky field checked
- Users Select inside custom metabox
- filtering custom post types via meta data drop down
- How to make condition, based on custom fields value?
- Speed up / Optimize Admin Edit Post Page on Large Websites (50-150k posts, 50 custom fields per post)
- Add & store extra fields – WordPress Comments
- Why is my Custom Meta Box Field Inputs NOT saving?
- Filter multiple custom fields Values with Check boxes
- Get registered custom fields or post meta even if empty
- Outputing a metabox textarea and avoid line breaks inside li tags
- Restrict WordPress Search to Custom Field
- How to add a custom field to a post created programmatically?
- How to mass update custom fields for more than 20k posts
- remove initial wysiwyg editor from cms page edit
- List all unique custom field values?
- Build index page from custom fields
- Importing WordPress Posts With Custom Meta Data As CSV Files Through PHPMyAdmin
- Modify date query by URL parameter using pre_get_posts and $_GET
- Upload & include specific JavaScript files for posts?
- help for user login
- The best way to collision check in WP
- Get meta field value of all catgories
- How to store meta field values
- Group Posts By Custom Meta Value: Date
- Having a repeating custom field in admin custom post type, what I’d go better with, for DB’s sake? ACF repeater or query a different post type?
- How can I detect user’s timezone?
- ACF field group not showing in page
- Filter post style attribute
- Update some (not all) post titles with custom field values before running the Loop
- Arrays in custom fields or is there a better way?
- Custom field in media library not saving, selected() function not adding “selected” to select list input type
- Setting user permissions per post
- Weird custom fields data lost
- Showing the post only when there is title, thumbnail and the content in Custom Fields
- WooCommerce 3 get custom variation on process order [closed]
- query_posts -> get page_id from custom field
- Custom field group on page
- Output Custom Field value to shortcode
- Update custom table on metabox POST
- display custom media folders to wordpress media popup
- Should I store arrays in custom fields or create custom tables?
- change attachment custom field onChange event
- Custom Meta Boxes and Fields for WordPress: Change directory upload based on user-edit page
- How to filter post using custom feild value in shortest and longest duration?
- Get custom field from other post in carousel
- Form fields based on custom fields
- show custom field content in jquery tabs
- Create citation and url in post using 3 custom fields with conditions for each field… So close!
- woocommerce how in checkout to add my custom field check box, and when i check it hide the shipping adress and add tax 19% [closed]
- Show only first image of multiple image field
- Custom Fields after update to WordPress 6
- Archive for custom fields?