Removing meta boxes
-
Hi,
I am trying to remove some meta boxes put in place by a theme I am using, but no matter what I try, they just will not be removed.
Using the following:
function remove_meta_boxes() { remove_meta_box( 'avhec_catgroupdiv', 'post', 'side' ); // Category Groups meta box [Plugin or BuddyPress] remove_meta_box( 'tagsdiv-post_tag', 'post', 'side' ); // Tags [WordPress default] remove_meta_box( 'content-options', 'post', 'side' ); // Content Options [Salutation] remove_meta_box( 'design-options', 'post', 'side' ); // Design Options [Salutation] remove_meta_box( 'layout-options', 'post', 'side' ); // Layout Options [Salutation] remove_meta_box( 'media', 'post', 'side' ); // Media [Salutation] remove_meta_box( 'wdfb_opengraph_editor', 'post', 'side' ); // OPenGraph [part of the FB Plugin] } add_action('admin_menu', 'remove_meta_boxes');
The first two work and the meta boxes are removed, but the last four do not work.
Can anyone see why this is the case?
Additionally, I would like to apply all of these rules to the author role and below only – would adding the following work for this?
if ( !current_user_can( 'edit_published_posts' ) ) { // if user is below Author level
Thank you to anyone who can offer some assistance.
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Removing meta boxes’ is closed to new replies.