2026年11月12日
2026年11月12日
WordPress Meta Box Not Showing: How to Fix It
This article is a localized edition of the Japanese original. Read the Japanese original
Introduction
A meta box added by a plugin does not appear on the post edit screen, a meta box you used to see has suddenly disappeared, or the meta boxes in the sidebar vanished after you switched to the block editor. Whether a meta box is hidden depends on your screen settings and on compatibility with the block editor.
Symptoms and Causes
The main reasons a meta box does not show up:
- Hidden in Screen Options: The per-user display setting is set to hidden
- Incompatible with the block editor: The
__block_editor_compatible_meta_boxsetting is required - Hook priority problems: The timing of the
add_meta_boxeshook is off - Wrong post type: The post type in the third argument is incorrect
- Plugin conflict: Another plugin removes the meta box
How to Fix It
Step 1: Check Screen Options
The most common cause is that the meta box is hidden in Screen Options.
1. Click "Screen Options" at the top right of the post edit screen
2. Check whether the box for the meta box you want to see has been unchecked
3. Check it and close the panel, and the meta box appears
Step 2: Check your add_meta_box implementation
// functions.php — add a meta box correctly
add_action('add_meta_boxes', function() {
add_meta_box(
'my_meta_box_id', // ID (a unique string)
'Custom Info', // Title
'render_my_meta_box', // Callback function
['post', 'page'], // Post types (pass an array for several)
'normal', // Context: normal/side/advanced
'high' // Priority: high/core/default/low
);
});
function render_my_meta_box($post) {
wp_nonce_field('my_meta_nonce_action', 'my_meta_nonce');
$value = get_post_meta($post->ID, '_my_field', true);
echo '<input type="text" name="my_field" value="' . esc_attr($value) . '">';
}
Step 3: Show meta boxes in the block editor
The block editor (Gutenberg) has only limited support for meta boxes.
// Show the meta box in the block editor as well
add_action('add_meta_boxes', function() {
add_meta_box(
'my_meta_box_id',
'Custom Info',
'render_my_meta_box',
'post',
'normal',
'high',
// Declare block editor compatibility explicitly
['__block_editor_compatible_meta_box' => true]
);
});
Step 4: Disable the block editor to test
// functions.php — disable the block editor for a specific post type
add_filter('use_block_editor_for_post_type', function($use_block_editor, $post_type) {
if ($post_type === 'post') {
return false; // Switch to the Classic Editor
}
return $use_block_editor;
}, 10, 2);
Alternatively, you can install the "Classic Editor" plugin and configure it from the admin screen.
Step 5: Debug how meta boxes are displayed
// Check whether the meta box is registered
add_action('add_meta_boxes', function() {
global $wp_meta_boxes;
error_log('Meta boxes: ' . print_r(array_keys($wp_meta_boxes), true));
}, 999); // Priority 999 so it runs last
Step 6: Check for plugin conflicts
# Deactivate all plugins with WP-CLI and check the meta box
wp plugin deactivate --all
# Open the post edit screen in your browser and see whether the meta box appears
# If it does, reactivate plugins one at a time to find the culprit
wp plugin activate plugin-name
Step 7: Reset the user meta
Screen Options settings are stored in user meta.
// Reset the meta box visibility settings for a specific user
delete_user_meta(get_current_user_id(), 'metaboxhidden_post');
delete_user_meta(get_current_user_id(), 'metaboxhidden_page');
Caveats
- Screen Options settings are saved per user. Other users need to change their own settings separately.
- In the block editor, only meta boxes with the
sidecontext are shown in the sidebar. - If you use ACF (Advanced Custom Fields), you need field group settings that support the block editor.
Summary
If a meta box does not show up, first check its box in "Screen Options". In the block editor, the __block_editor_compatible_meta_box setting is required. If that still does not solve it, isolate plugin conflicts. Related articles: When custom fields won't save, When the block editor crashes
Questions about WordPress? The publisher of this site is based in Japan and replies in Japanese. Contact (Japanese)