GavickPro / Meet-GavernWP

Meet GavernWP is a responsive free Wordpress theme
35 stars 23 forks source link

remove/hide metaboxes #271

Closed miley-w closed 11 years ago

miley-w commented 11 years ago

hi how are you? how i can remove/hide Post additional params and Featured Video metaboxes from post? my website have many users so i want remove these metaboxes for non-admin users (authors) is there a code for function.php same as http://wpmu.org/remove-wordpress-meta-boxes/ ? thanks

piotrkunicki commented 11 years ago

Hi,

You can use this code to hide these metaboxes:

// REMOVE POST META BOXES
function remove_my_post_metaboxes() {
    remove_meta_box( 'gavern_featured_video','post','side' ); 
    remove_meta_box( 'gavern-post-params','post','side' ); 
}
add_action('do_meta_boxes','remove_my_post_metaboxes');

The best place for this is gavern/user.functions.php file (you won't have problem with future theme update). And of course you can add additional condition only for non-admin users.

miley-w commented 11 years ago

thanks :*