WordPress filter hook · part of WordPress core
postmeta_form_limit
A WordPress core filter that 16 plugins also fire themselves, running on 17.5M+ sites between them.
“Filters the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.”
How to use postmeta_form_limit
It's a filter: your callback receives the value, and must return the (changed) value.
Add this to your theme's functions.php or a small custom plugin:
add_filter( 'postmeta_form_limit', function( $value ) {
// Change $value here.
return $value;
}, 10, 1 );Argument names come from Yoast SEO's source. Other plugins may pass different values: check the call in the plugin you're targeting below.
This hook is fired by WordPress core too. Official reference on developer.wordpress.org →
16 plugins that fire postmeta_form_limit
Sorted by active installs. Each entry shows where the plugin calls the hook and what it passes.
-
Yoast SEO10+ million installs
apply_filters( 'postmeta_form_limit', 30 )inc/class-wpseo-custom-fields.php:43 -
WooCommerce7+ million installs
apply_filters( 'postmeta_form_limit', 30 )src/Internal/Admin/Orders/MetaBoxes/CustomMetaBox.php:125 -
SEOPress300,000+ installs
apply_filters( 'postmeta_form_limit', 250 )seopress-functions.php:547 -
Product Feed PRO for WooCommerce by AdTribes80,000+ installs
apply_filters( 'postmeta_form_limit', 30 )includes/Classes/WP_Admin.php:317 -
Media Library Assistant70,000+ installs
apply_filters( 'postmeta_form_limit', 1000 )examples/plugins/mla-multi-search-example.php:140 -
MainWP Dashboard: Self-hosted WordPress Management for Agencies20,000+ installs
apply_filters( 'postmeta_form_limit', 30 )pages/page-mainwp-post.php:1601 -
Welcart e-Commerce10,000+ installs
apply_filters( 'postmeta_form_limit', 30 )functions/item_post.php:830 -
CleverReach® WP4,000+ installs
apply_filters( 'postmeta_form_limit', 30 )Components/Repositories/class-article-repository.php:360 -
Content Blocks Builder1,000+ installs
apply_filters( 'postmeta_form_limit', 30 )includes/custom-blocks.php:670 -
Geo Mashup1,000+ installs
apply_filters( 'postmeta_form_limit', 30 )geo-mashup-db.php:2248 -
Custom Fields for Gutenberg1,000+ installs
apply_filters( 'postmeta_form_limit', 30 )inc/plugin-core.php:128 -
Fast Woo Order Lookup300+ installs
apply_filters( 'postmeta_form_limit', 30 )code/class-custom-fields.php:61 -
Custom Fields Display100+ installs
apply_filters( 'postmeta_form_limit', 30 )custom-fields-display.php:30 -
Taxonomy Meta UI10+ installs
apply_filters( 'postmeta_form_limit', 30 )classes/class.taxonomy-meta-ui.admin.php:312 -
Apptivo eCommerce10+ installs
apply_filters( 'postmeta_form_limit', 30 )apptivo_ecommerce.php:137 -
WP Front AdminFewer than 10 installs
apply_filters( 'postmeta_form_limit', 999 )wp-front-admin.php:232
Need a customisation built on this hook?
Tell us what you want to change and which plugin it's for. We'll write it, test it and send it back as a small plugin.