最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

Admin Bar Acting Up

matteradmin10PV0评论

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

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

Share Improve this question asked Oct 31, 2018 at 17:39 user153341user153341 1
Add a comment  | 

1 Answer 1

Reset to default 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!

Articles related to this article

Post a comment

comment list (0)

  1. No comments so far