• Resolved andymaggs65

    (@andymaggs65)


    Hi,

    Can the ‘Prevent dashboard acess’ option also be extended to hide the wordpress admin bar for these prevented users because it needlessly takes up screen real estate with options that the user can no longer access?

    Kind Regards

    Andy

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello @andymagg265,

    If you mean the black bar at the top, we don’t have the option to hide/show depending on the roles. We will see if we can extend that ‘Prevent dashboard access’ option. Thanks for the suggestion.

    However, You can disable the bar manually from the user profile. Go to the User and uncheck show toobar when viewing site.

    Here is the screenshot: https://ibb.co/bLbYy8

    Regards,
    WPEverest Support

    Thread Starter andymaggs65

    (@andymaggs65)

    Hi @sanzeeb3,

    Thanks for getting back to me and for the very useful information.

    If you didn’t want to implement the change, could you instead simply set the toolbar to off by default for newly registered users (or can I already do that myself)?

    Kind Regards

    Andy

    Hello Andy,

    Yes. You can hide the toolbar for all users with some script. If you want to disable it for all users, then simply put this code in your theme’s functions.php file
    show_admin_bar(false);

    If you want to disable admin bar for all users except for administrators, put this code in your theme’s functions.php

    add_action('after_setup_theme', 'ur_remove_admin_bar');
    function ur_remove_admin_bar() {
       if (!current_user_can('administrator') && !is_admin()) {
         show_admin_bar(false);
       }
    }

    Hope this helps!

    Regards,
    WPEverest Support
    Sanjeev Aryal

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide Admin Bar’ is closed to new replies.