Skip Navigation

[Resolved] Hide postgroup metabox for post type

This support ticket is created 4 years, 5 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

This topic contains 1 reply, has 1 voice.

Last updated by pedro.S 4 years, 5 months ago.

Author
Posts
#1678223

I need POSTS to be managed by access but i dont want the postgroup metabox to be disabled only for that post type. But i'm not beeing able to hide the metabox by any means.

Here's what i got at the moment:

function func_remove_types_meta_box() {
    global $post_type;
    global $post;
    if($post_type=='post'){
        remove_meta_box( 'access_group', $post_type,'normal');
    }
}
add_action('admin_head', 'func_remove_types_meta_box', 9999);
#1678227

My issue is resolved now. Thank you!

It was the location that was wrong. In case someone needs here it is.

function func_remove_types_meta_box() {
    global $post_type;
    global $post;
    if($post_type=='post'){
        remove_meta_box( 'access_group', $post_type,'side');
    }
}
add_action('admin_head', 'func_remove_types_meta_box', 9999);