Increase Custom Fields Dropdown Limit

For your functions.php file or custom plugin:

// Increase number of meta fields shown in dropdown
add_filter('postmeta_form_limit', 'customfield_limit_increase');
function customfield_limit_increase($limit) {
  $limit = 100;
  return $limit;

Otherwise, the dropdown for Custom Fields is capped at 30 (alphabetically).




  1. User Avatar
    Permalink to comment#

    Thanks for your post..
    I needed this.. but I also need an addition to it.
    Do you know if there is a way to filter out certain meta values from displaying in the drop down?
    I have about 50 in my drop down but only 15 of them are actually viable for use in a “new order” admin
    I would like to display only the valid order based fields.

    Thanks for any assistance you can offer.

  2. User Avatar
    Permalink to comment#

    Thank you for this! I have bookmarked your website. I had to use another plugin called ACF. Now, with this that is not required also it was simple to add the code and get it right as I wanted. Also, if you can help me with Butch’s concern that would be great

Leave a Comment

Posting Code!

You may write comments in Markdown. This makes code easy to post, as you can write inline code like `<div>this</div>` or multiline blocks of code in triple backtick fences (```) with double new lines before and after.

Code of Conduct

Absolutely anyone is welcome to submit a comment here. But not all comments will be posted. Think of it like writing a letter to the editor. All submitted comments will be read, but not all published. Published comments will be on-topic, helpful, and further the discussion or debate.

Want to tell us something privately?

Feel free to use our contact form. That's a great place to let us know about typos or anything off-topic.