Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress

Gina Bégin
PLUS
Gina Bégin
Courses Plus Student 8,613 Points

Can't remove admin bar for ALL users (incl admin) on the public site in Wordpress

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.