Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save devendrabhandari/f5d9a28d213c6b6d543a79b9ba6a0346 to your computer and use it in GitHub Desktop.
Save devendrabhandari/f5d9a28d213c6b6d543a79b9ba6a0346 to your computer and use it in GitHub Desktop.
Increase the number of custom fields to retrieve for the drop-down in the Custom Fields meta box.
#Custom Fields Dropdown - WordPress Admin Dashboard
By default limit is 30 keys shown in the dropdown. If you want to increase the limit.
add_filter( 'postmeta_form_limit', 'meta_limit_increase' );
function meta_limit_increase( $limit ) {
return 300; // change it accordingly
}
Ref: https://developer.wordpress.org/reference/hooks/postmeta_form_limit/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment