0

my admin bar was randomly gone. I ddn't notice at first but I installed BuddyPress and was thinking maybe it was due to this and their specific admin bar stats for guests etc.

I de-activated BuddyPress (for now) and still no admin bar. Then I did the cliche user profile toggle switch check and sure enough... it was off. Great, quick easy fix and then I'm on my way. Problem with this is - when I toggle it on and save the changes, it refreshes with the thing UNTOGGLED. What is the issue here? The thing literally unchecks itself every refresh and basically wont let me save it to keep the admin bar on. Tripping me out, never had a untoggling toggler toggling tog in my life LOL. Can't find the culprit

1 Answer 1

0

Try adding this code to your theme functions.php file:

if ( is_user_logged_in() ) {
  show_admin_bar( true );
}

If this doesn't work, try logging into your site using a new "Incognito" window and see if the Admin Bar shows up on the front end. If it does, you probably need to clear the cookies for your site. Hope that helps!

4
  • admin bar is missing in both incog & normal. Stupid WP says "Something went wrong. Your change may not have been saved. Please try again. There is also a chance that you may need to manually fix and upload the file over FTP." when trying to inject the code. Problem still exists obviously. Never understand how these surprise issues can come about sometimes (despite plugin use).
    – user153341
    Oct 31, 2018 at 20:43
  • @user153341 Sounds like maybe your WP install is locked down from editing files inside the admin interface? Do you have FTP access?
    – Mike C.
    Oct 31, 2018 at 21:07
  • I do have FTP Access!
    – user153341
    Nov 1, 2018 at 20:13
  • can you try adding that code to your theme functions file via FTP?
    – Mike C.
    Nov 5, 2018 at 21:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.