Custom field metabox not showing in back-end

admin2025-06-07  45

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?

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?

Share Improve this question asked Oct 20, 2018 at 22:41 PimPim 1,1521 gold badge11 silver badges26 bronze badges 7
  • 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 Commented Oct 20, 2018 at 23:09
  • It is from a CPT, but it's just the same on regular posts. – Pim Commented Oct 20, 2018 at 23:17
  • Try to disable all plugins? And sorry, I meant "custom fields" when I said "meta box". – Sally CJ Commented Oct 20, 2018 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 Commented Oct 21, 2018 at 18:36
  • 1 +1 for both the helpful answer and question. =) – Sally CJ Commented Oct 22, 2018 at 3:16
 |  Show 2 more comments

2 Answers 2

Reset to default 7

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');

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

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1749243580a317560.html

最新回复(0)