5

I recently updated my website after a while, and the custom fields meta box is not showing in the editor anymore. It isn't showing under "Screen Options" either. Any ideas why this could be, and how to get it back?

enter image description here

  • Is that screenshot coming from the edit page for a CPT? Maybe the CPT doesn't have custom fields enabled, or you need to re-enable it back after the update. There might also be a plugin which hides/disables the meta box on that page. – Sally CJ Oct 20 '18 at 23:09
  • It is from a CPT, but it's just the same on regular posts. – Pim Oct 20 '18 at 23:17
  • Try to disable all plugins? And sorry, I meant "custom fields" when I said "meta box". – Sally CJ Oct 20 '18 at 23:26
  • 1
    It's the ACF plugin that removes default custom fields display, but I haven't found a way around it. I need both ACF and default custom fields metaboxes. – Pim Oct 21 '18 at 18:36
  • 1
    +1 for both the helpful answer and question. =) – Sally CJ Oct 22 '18 at 3:16
5

It turns out the latest Advanced Custom Fields update (from version 5.6.0 on) removes the core custom fields metaboxes by default.

The way to restore it was to add a filter in functions.php:

add_filter('acf/settings/remove_wp_meta_box', '__return_false');
| improve this answer | |
0

When registering a custom post type you have to declare that it supports the custom fields meta box to get it, e.g.:

'supports' => array( 'title', 'editor', 'custom-fields' )

But most people don't do this, and build real metaboxes instead. This way instead they can put in radio buttons and drop downs etc

| improve this answer | |
  • It's actually registered with custom fields support. – Pim Oct 21 '18 at 18:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.