How to Hide WordPress Metaboxes in the Post Editor
A WordPress website always starts by looking very clean. But after you choose a theme and install a lot of plugins, the user interface quickly becomes very crowded.
In other guides, we've shown you how to hide WordPress admin menus, hide the admin toolbar, and hide dashboard widgets. In this tutorial, we'll explain how to hide the “metaboxes” that appear below your WordPress posts and in the sidebar, when you're editing a post.
In the image below, you can see some typical metaboxes from Yoast SEO, the PublishPress plugin, TaxoPress, and others.

Option #1. Hide the Meta Boxes for Yourself
This first option allows you to hide the meta boxes when you are editing posts.
- Click the three dots in the top-right corner of the screen.

- Scroll to the bottom of the panel that appears in the right sidebar.
- Click the “Preferences” link.

- Click the “Panels” tab.
- In the “Additional” area, you can disable any meta boxes that you don't want to see.

Option #2. Hide meta boxes for some roles
The Pro version of the PublishPress Capabilities plugin allows you to hide metaboxes for specific user roles.
In the image below, you can see two metaboxes:
- “Yoast SEO” from the Yoast SEO plugin.
- “Editorial Comments” from the PublishPress plugin.

To hide these metaboxes, follow these steps:
- Go to “PublishPress”, then “Editor Features” in your WordPress admin menu.
- Choose the user role you want to hide the metaboxes for:

- Scroll down to the bottom and find the “Metaboxes” area. If you don't see all your metaboxes, go to edit a post and then reload this “Editor Features” screen.

- Place a red X for any metabox you want to hide. In the image below, we are hiding both the “Yoast SEO” and “Editorial Comments” metaboxes.

- Click “Save Changes”.
- Visit the post editing screen as a user in the role you selected. You will no longer see the metaboxes you selected.
Option #3. Hide Meta Boxes for Everyone
If you want to remove meta boxes for all users on your site, I recommend using a code solution.
In the image below, I have two meta to remove: Yoast SEO, and also the custom fields feature in the WordPress core:

First, we'll try some custom code.
Add this to your theme's functions.php file and you will disable the meta boxes for all users when they are editing posts. The “Custom Fields” metabox is covered by the line “postcustom”. You can expand this code with more lines for “pages” and other post types.
function remove_meta_boxes() {
# Removes meta from Posts #
remove_meta_box('postexcerpt','post','normal' );
remove_meta_box('postcustom','post','normal');
remove_meta_box('trackbacksdiv','post','normal');
remove_meta_box('commentstatusdiv','post','normal');
remove_meta_box('commentsdiv','post','normal');
}
add_action('admin_init','remove_meta_boxes');
You can find the name of each metabox by using the inspect tools in your browser. In the example, below, we will need wpseo_meta
to target the metabox for Yoast SEO.

Does option #1 do it for the post/page you are editing or all posts/pages? Your doc is unclear on that.
Hi Dozza. It should apply for all examples of the post type.