Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1471968

    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

    #1472019

    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

    #1472024

    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

    #1472028

    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:
    use wpcode php snippet and activate
    and ensure that it is activated, then add the above code and save.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.