• Hallo fellow wordpress users,

    For a while i am trying to remove this toolbar for normal users and costumers. I have tried many snippets for my function file, disabling it as administrator and installing varius plugins but nothing get it to work. Somehow new and existing users (even tho the checkbox is unchecked) are still seeing the toolbar. Something is overwriting every setting and snipcode. I haven’t been able to get it away for the costumers.

    I am using woocommerce and people can make their own account. I just dont want them to see it…
    Is there anyone with the same overwrite problems.

    https://premium.wpmudev.org/blog/wp-content/uploads/2014/07/toolbar-option1.jpg

    Thanks in advance

Viewing 3 replies - 1 through 3 (of 3 total)
  • To remove the Admin Bar for all users except Admins, add this to your Child Theme functions.php file:

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

    And to remove it for all users add this instead:

    show_admin_bar(false);

    Hope this helps.

    Thread Starter thaqua

    (@thaqua)

    Thanks for your reply. I reconized this code but i tried it eitherway agian and unfortunately with no result. The admiinbar is still showing. I think there is something overwriting it because now i have this code in my functions php and the checkbox in the usersettings unchecked and still it is showing for a normal costumer

    Thread Starter thaqua

    (@thaqua)

    Someone else that can helo me overrull this rule?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Admin / toolbar removal’ is closed to new replies.