Long time ago, we shared a little snippet to remove some unnecasary default widgets from your WordPress dashboard. It’s a great thing to do if you’d to have a cleaner WordPres dashboard.
In today’s tutorial, we’ll show you how to remove metabox from WordPress post editor. By default, there are many metaboxes in the post edit screen – Categories, Tags, Featured Image, Discussions, Custom Fields and more. Besides the WordPress default metaboxes, some themes (ex: Genesis Framework) and plugins (ex: Yoast WordPress SEO) also add their own custom metaboxes to your post editor.
WordPress as a function called
remove_meta_box to remove any metabox from the post editor. For more information about this, please refer to the WordPress Codex page.
The code should be placed in
functions.php file of your child theme, or your site functionality plugin.
Of course, there are lots more you can do with the code. WordPress has many conditional tags to checks where the code should be applied to. For example, if you’d like to remove the metaboxes from non-admin users only, you can check based on the user roles.
Similarly, you can use the same way to remove any metabox added by themes or plugins. However, some plugins or themes even include an option to remove the metaboxes from the settings page. For Genesis Framework users, here’s a tutorial we wrote on how to remove metaboxes from Genesis Framework settings page.
Morshed Alam Suman says
Doesn’t remove tag metabox.