0
votes

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.

1
I assume you've deactivated the theme (while the admin bar is disabled for your user) to confirm that its been added by it? If it's not the theme itself, have you tried disabling all plugins, to see if any of them are causing it to be displayed?FluffyKitten

1 Answers

1
votes

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

Example code.

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