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

    Hello.

    How can I remove “Theme Extensions” from the admin bar?

    Thank you.

    #1353276

    Hey peterolle,
    Try adding this code to the end of your child theme functions.php file in Appearance ▸ Editor:

    function cAdmin() {
    	$current_user = wp_get_current_user();
    	$user = $current_user->user_login;
    	return ($user === 'enfold');
    }
    add_action('admin_bar_menu', 'update_adminbar', 999);
    function update_adminbar($wp_adminbar) {
    	if(cAdmin()) return;
    	$wp_adminbar->remove_node('avia_ext');
    }

    Best regards,
    Mike

    #1353293

    Thank you!

    You can close it as solved.

    • This reply was modified 2 years, 5 months ago by peterolle.
    #1353295

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Remove Theme Extensions from admin bar’ is closed to new replies.