Thread Starter
losrack
(@carlos-jaramillo)
I tried this but it removes it for every one …
function remove_contact_menu () {
global $menu;
$restricted = array(__('Contact'));
end ($menu);
while (prev($menu)){
$value = explode(' ',$menu[key($menu)][0]);
if(in_array($value[0] != NULL?$value[0]:"" , $restricted)){unset($menu[key($menu)]);}
}
}
add_action('admin_menu', 'remove_contact_menu');
if(!current_user_can('level_10')) {
add_action('admin_menu', 'remove_contact_menu');
}
I guess I can disable or enable it when ever I need it. But would like to have it just for admin the whole time…
Thread Starter
losrack
(@carlos-jaramillo)
Hi, Thanks for the info …
I actually found that a bit earlier …
But .. is it possible to allow only MAIN ADMIN to access it?.
The thing is I need some collaborators to post stuff and all .. but it is really important they do not hace access to some stuff like this.
Regards …
@carlos
So in that case I would just use any of the existing user roles on the site, or go and create a custom user role. Then assign those users to that user role.
I have used this plugin on a couple of client sites.
https://wordpress.org/plugins/wpfront-user-role-editor/