Hi,
do we have a mean to hide the “Theme Option (settings)” menu for non admin ?
I uess yes but do not find it and even with the “Members” plugin
ty
Hey Ad-Min747,
Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:
add_action('admin_bar_menu', function ($wp_admin_bar) {
if (!current_user_can('administrator')) {
$wp_admin_bar->remove_node('avia');
}
}, 999);
function hide_enfold_theme_options_menu() {
if (!current_user_can('administrator')) {
echo "<style>#toplevel_page_avia { display: none; }</style>";
}
}
add_action('admin_head', 'hide_enfold_theme_options_menu');
Best regards,
Mike
Hi Mike,
I’m not sure where to find the functions.php file. I didn’t see it in Enfold child theme menu or in wp appearance.
Do I have to reach it via filezilla ftp?
ty
Hi,
If you don’t have WordPress ▸ Appearance ▸ Theme File Editor enabled on your site then use FTP
If you are not using a child theme you could use the WP Code plugin then add a new snippet, in the top right corner use the PHP snippet as the code type:
and ensure that it is activated, then add the above code and save.
Best regards,
Mike