zad78
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Customizr] navigation between postsFinally, i coded it.
Forum: Plugins
In reply to: [Smart Slider 3] Height and croppingThanks for your help, it works perfectly !
Hello,
I created a custom post type.
I’m trying to remove the AIOSP meta box using this code for authors only.function remove_aiosp_meta_box() {
$current_user = wp_get_current_user();
if(!in_array(‘administrator’,(array)$current_user->roles) ) {
remove_meta_box(‘aiosp’, ‘myposttype’, ‘normal’);
}
}
add_action(‘do_meta_boxes’, ‘remove_aiosp_meta_box’);But the meta boxes keeps on my post type even.
I also have User Role Editor plugin were Authors have no capabilities for aiosp_manage_seo.
How should i do to remove the metabox for authors.
Thanks in advance
Hi,
I tried this snippet. But it seems it does not remove the custom sidebar when the user is not administrator.my configuration : wp 4.7.5
A few precisions :
I have the user switcher plugin installed. But even if don’t use it and connect normally with an author account, it does not disappear.I created my post type with Custom Post Type UI.
Thanks in advance !