Admin bar menus disappear for super admin

When you choose administrator in the "Select User Roles affected by above" section it affects the super admin role. This is really aggravating as you can't set a default user role for new sites in pro sites and I don't want all options showing up for admins in their new site. But if I select administrator I lose all the functionality I need to manage the site. This has me very frustrated. Can some one please explain this. thanks

  • Vaughan

    Hi robert,

    Hope you're well?

    This is actually how it was designed, as there was a need to not show default menu items for super-admins & admins, however I can see how this might not be suitable for some cases as explained above.

    As a temporary fix, you should be able to edit the plugin code directly.

    Open up & edit /wp-content/plugins/ultimate-branding/ultimate-branding-files/modules/custom-admin-bar-files/inc/UB_Admin_Bar.php

    Find the following at line 611

    if( !is_user_logged_in() || !isset( $wproles['wp_menu_roles'] ) || ( isset( $wproles['wp_menu_roles'], $current_user ) && is_array( $wproles['wp_menu_roles'] ) &&  count( array_intersect( $wproles['wp_menu_roles'], (array) $current_user->roles) ) ) ) {

    Replace with:

    if( !is_user_logged_in() || !isset( $wproles['wp_menu_roles'] ) || ( isset( $wproles['wp_menu_roles'], $current_user ) && is_array( $wproles['wp_menu_roles'] ) &&  count( array_intersect( $wproles['wp_menu_roles'], (array) $current_user->roles) ) && !current_user_can('manage_network') ) ) {

    Hopefully that should then disable the roles so that they only affect admins & not super-admins.

    let me know if that works, i'll see about adding a super-admin checkbox to the list instead in a future update.

    Hope this helps

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.