Why is Custom Fields dropdown missing some field names on Add New Post page?

I have an ongoing problem with “Custom Fields” section of the “Add New Post” page.

There are a couple custom field Names I use often, but in the dropdown they are never there. Instead there are lots of fields related to the theme or other plugins. So each time we need to manually write the names, which is tedious when dealing with many posts in a day.

Is there a way to clear out the info in the dropdown and only show a particular group of field names?

I notice on some blog installs I manage that the dropdown does show these field names, but on others it doesn’t. So why on some and not on others? How do i ensure to always see those in the dropdown?

  • Milan
    • WordPress Wizard

    Hello @paperweight,

    I hope you are having a good day and thanks for asking us. :slight_smile:

    I am not sure what is happening on your end with custom field dropdown, but I was able to see all of custom created fields on my two of sandbox installation. So there could be issue with wordpress version or some plugin/theme conflict ?

    Also have you installed any plugin on your end which actually alters custom field creation ? Something like Advanced custom fields plugin ?

    If not here is simple test you can take down to identify what is issue cause.

    #1) Disable all the plugins

    #2) Activate default wordpress theme

    #3) Add new custom field without any special character in its name. ( I think this could be issue too )

    Let me know your results. :slight_smile:

    Cheers,

    Milan

  • paperweight
    • The Incredible Code Injector

    Thanks for your help and advice~ I manage dozens of WordPress sites and this happens to almost all of them, regardless of the types of plugins, etc. For example, on one installation we use SNAP NEXTScripts plugin (https://wordpress.org/plugins/social-networks-auto-poster-facebook-twitter-g/) and the Custom Fields dropdown is filled with Names related to the plugin. But if I manually create some new fields, they are not shown later when I create a new Post.

    But… if I have a brand new install and then add some fields, then they seem to always show in the future…. so the problem appears to be that the dropdown only shows X number of field names, and once it reaches that X maximum, it doesn’t display any new ones… does that seem to be the case?

  • Adam Czajczyk
    • Support Gorilla

    Hello paperweight!

    But… if I have a brand new install and then add some fields, then they seem to always show in the future…. so the problem appears to be that the dropdown only shows X number of field names, and once it reaches that X maximum, it doesn’t display any new ones… does that seem to be the case?

    I think WP is not always showing all available custom fields if there’s too many of them so you’re right about that. Also, many plugins use (and create) custom fields and there’s no way for WP to automatically differentiate whether a custom field comes from plugin, a theme, a custom function that you put into functions.php file (or as a MU plugin) or if you created it manually. Furthermore, plugins are executed on page load mostly (in some order but that’s quite other issue) and when you manually create a filed, it happens after plugin are loaded meaning that custom fields coming from those plugins already exist (were created earlier during the load-flow).

    That being said, I agree with my colleague Milan that the “Advanced Custom Fileds” plugin would be a handy solution for you. Take a look here:

    https://wordpress.org/plugins/advanced-custom-fields/screenshots/

    The plugin include “location rules” that should allow you define which custom fileds (and in what form) should be automatically displayed under the WP editor for various types of post (e.g. posts, pages, products etc). This would let you easily manage and use the fields you need and pretty much ignore (including getting them “out of sight”:wink: those fields that are automatically created and managed by some plugins.

    Best regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.