Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].
Hello. I’m trying to use all kinds of plugins which disable the admin toolbar from non-admin users frontend. But looks like it is somehow related to Vantage theme and when a customer or subscriber are loged in, they always see that admin toolbar. Is there some kind of custom css code which would disable it?
UPDATE: i found a code which disables a toobar fron frontend:
if ( !is_admin() ) {
add_filter( ‘show_admin_bar’, ‘__return_false’, 1000 );
}
Now can i insert this code into functions.php file at the very bottom? I’m afraid that it can disappear after theme updates or other things. Can you confirm me, that it is ok to insert that code into the bottom of functions.php file and it won’t ruin anything? Or would it be better to make a child theme and insert it there? After i create a child theme, all my customization settings are lost :(
My text for child theme functions.php file is this:
Ups not next is showing.. Nevermind.. Let’s just stick with the admin bar thing.
Hi Vytenis,
Glad you managed to work it out. The code will need to be moved to a child theme or it’ll be lost on update. Sadly you’ll need to use a third party plugin to move your customizer data over (general WordPress requirement :/). I recommend this one. Once installed, be sure you’re using the parent them then navigate to the customizer and export the data. Switch to the child theme and import the data.
A bit too late :) I manually reentered all customization settings :) Anyway, thanks.