How to hide meta_box for users (Not from Admin)?
-
I have wrote a function to my themes function.php to hide ALL IN ONE SEO (Meta box) from users, but I want to see this Meta box as Admin.
This function works sucsessfully to hide the Meta box, but now I can′t see it as Admin.
Why, what have I done wrong?
—–add_action(‘init’, ‘remove_aioseop’);
function remove_aioseop() {
remove_action(‘admin_menu’, ‘aioseop_meta_box_add’);
}
if (!current_user_can(‘edit_users’)) {
add_action(‘admin_menu’, ‘aioseop_meta_box_add’ );
}—–
(This BOLD part don′t work)Thanks for helping
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘How to hide meta_box for users (Not from Admin)?’ is closed to new replies.