简体   繁体   中英

Trying to Remove Stubborn Admin Bar (for ALL users, incl admin) from Avada Wordpress Site

We have tried adding many variations of the "show_admin_bar(false);" to our functions.php file to remove the admin bar on our Wordpress site to no avail. Have tried clearing caches both in my server, my site, and in the browser multiple times (after each instance). I checked the forums and tried some of the solutions here, but most are to remove the bar for all but admins (I don't want it at all on the front end) and the rest I've tried haven't worked.

We've even tried just removing it in the dashboard > users area, though I know that would only apply to a specific user (and it still shows, even though I've checked for it to be off on my account).

Unfortunately, I didn't keep track of all the variations of the "show_admin_bar(false);" command I tried as I thought I'd be able to get this to work since it wasn't a problem in the past, but I do know this one doesn't work: add_filter('show_admin_bar', '__return_false');

We also want to make sure whatever the solution is, it removes the gap where the admin bar once was, since I remember that being a problem in the past with the Avada theme we're using.

Site Info

Theme: Avada v 5.2.2

WordPress v 4.8.1

Website: https://www.outdoorwomensalliance.com

Any other info needed from me to help figure out why this bar won't leave me in peace?

Thank you.

You have set filter priority, here is the documentation for filter

Example code.

add_filter('show_admin_bar', '__return_false', 99);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM