List More Custom Field Names

Author:Scott Reilly
First released:2009-06-30
Last update:2015-08-15
Compatibility:WP 2.6 – 4.3.1
Download:[ zip ]

Allows for more existing custom field names to be listed in the dropdown selection field when writing a post.

Extended Description

By default, WordPress only allows 30 custom field names/keys to be listed in the dropdown selection ‘Name’ field when writing a post or page. If you, or the plugins you use, make use of a lot of custom field key names, you may surpass the default limit resulting in some custom field keys not being listed. This may force post authors to manually type in custom field key names if they aren’t listed, which increases the chances for naming errors (typos, or not using the precise key name that is needed). This may also cause some authors concern wondering where previously used custom field keys have gone since they aren’t listed.

This plugin increases the limit to 200 custom field key names. Due to the simplistic nature of the plugin and the overhead of doing so for a single setting, there is no settings page to customize this value. Assuming you want to change the value of the limit to 100, you can do so in either of two ways:

  1. By editing your wp-config.php file and at the end adding a line such as:
    define( 'CUSTOM_FIELD_NAMES_LIMIT', 100 );
  2. Somewhere, most likely in your active theme’s functions.php file, hook the ‘c2c_list_more_custom_field_names’ filter and return the number you’d like:
    add_filter( 'c2c_list_more_custom_field_names', create_function( '$limit', 'return 100;' ) );

Links: Plugin Homepage | Plugin Directory Page | Author Homepage

Find out more at the plugin’s WordPress Plugin Repository page.


  1. Unzip inside the /wp-content/plugins/ directory for your site (or install via the built-in WordPress plugin installer)
  2. Activate the plugin through the ‘Plugins’ admin menu in WordPress
  3. (Optional) In wp-config.php, customize the number of custom fields you want shown. The default of 200 can be changed by adding a line like:
    define( 'CUSTOM_FIELD_NAMES_LIMIT', 100 );

Frequently Asked Questions

Q. What is the default number of custom field names/keys that WordPress lists in the admin when writing/editing pages and posts?
A. WordPress only lists up to 30.

Q. How many custom field names/keys does this plugin list in the admin when writing/editing pages and posts?
A. By default, this plugin lists up to 200. You can customize this value.

Q. How can I customize the default number of custom field name/keys listed in the admin when writing/editing pages and posts?
A. There are two ways you can customize this value (in both examples, change 100 to the number you’d like to use):

  1. In your wp-config.php file (in the root directory of your blog), add the following line of code (making sure it is within the opening <?php and closing ?> PHP tags):

    define( 'CUSTOM_FIELD_NAMES_LIMIT', 100 );

  2. (recommended) Somewhere, most likely in your active theme’s functions.php file, hook the ‘c2c_list_more_custom_field_names’ filter and return the number you’d like:

    add_filter( 'c2c_list_more_custom_field_names', create_function( '$limit', 'return 100;' ) );

Q. Does this plugin include unit tests?
A. Yes.

Release Log

1.2.9 (2015-08-15)

  • Update: Note compatibility through WP 4.3+
  • Update: Minor plugin header tweaks (formatting)

1.2.8 (2015-02-11)

  • Note compatibility through WP 4.1+
  • Update copyright date (2015)

1.2.7 (2014-08-25)

  • Minor plugin header reformatting
  • Change documentation links to to be https
  • Note compatibility through WP 4.0+
  • Add plugin icon

1.2.6 (2013-12-17)

  • Add unit tests
  • Note compatibility through WP 3.8+
  • Update copyright date (2014)
  • Minor code and documentation reformatting
  • Change donate link
  • Add banner image


  • Cast limit as absolute integer rather than just an integer to disallow negative limits
  • Add check to prevent execution of code if file is directly accessed
  • Note compatibility through WP 3.5+
  • Update copyright date (2013)
  • Minor code reformatting (spacing)


  • Re-license as GPLv2 or later (from X11)
  • Add ‘License’ and ‘License URI’ header tags to readme.txt and plugin file
  • Remove ending PHP close tag
  • Note compatibility through WP 3.4+
  • Minor code reformatting (indentation)


  • Note compatibility through WP 3.3+
  • Minor code documentation reformatting in readme.txt


  • Note compatibility through WP 3.2+
  • Minor documentation reformatting in readme.txt
  • Add plugin homepage and author links to description in readme.txt


  • Note compatibility through WP 3.1+
  • Update copyright date (2011)


  • Functionality now in new c2c_list_more_custom_field_names() rather than in an anonymous function
  • Allow overriding of the default number of custom field names, via the ‘c2c_list_more_custom_field_names’ filter (default is 200)
  • Note compatibility with WP 3.0+
  • Remove docs from top of plugin file (all that and more are in readme.txt)
  • Add Upgrade Notice section to readme.txt


  • Add PHPDoc documentation
  • Note compatibility with WP 2.9+
  • Update copyright date


  • Default limit provided by plugin now overridden via CUSTOM_FIELD_NAMES_LIMIT constant, if defined (and no longer via global variable defined in plugin)
  • Added Changelog and FAQ to readme
  • Noted compatibility through WordPress 2.8+


  • Initial release

Copyright & Disclaimer

Copyright © 2009-2015 by Scott Reilly (aka coffee2code)

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Discussion / Support

Have any questions, comments, or suggestions? Please provide them via the plugin’s support forum. I’ll do my best to reply in a timely fashion and help as best I can.

Unfortunately, I cannot provide guaranteed support, nor do I provide support via any other means.

Was this plugin useful useful to you? Consider giving it a rating. If you’re inclined to give it a poor rating, please first post to the support forum to give me a chance to address or explain the situation.