the answer for all question about Oxygen Builder plugin and WordPress

I am trying to hide the admin bar for all users except the admin using Advanced

I am trying to hide the admin bar for all users except the admin using Advanced Scripts.

I am using this php code:

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

But it doesn’t work. It’ doesn’t hide the damin bar for anyone. I think I am using the wrong hook. Can anyone give me some pointers?

I am using Advanced Scripts together with Oxygen Builder if that makes any difference.



Source

Arya Design Set

Checkout Woo Design Set

Leave A Reply

Your email address will not be published.

Oxyrealm Docs OxyMade - Oxygen Builder Design Set Mega collection