29 Apr, 2011
The mysteriously disappearing WordPress 3.1 Admin Bar
Posted by: Jennifer In: WordPress|WordPress: Lessons Learned
I've run into this problem a few times now and it always takes me a minute or two to remember what caused it and how to fix it. So first of all, if you have NEVER seen the admin bar, make sure you:
1) have it activated in your profile to show where you want it to (ie. viewing the site, the WordPress admin, or both).
2) Make sure both wp_head(); is in your header.php and wp_footer(); is in your footer.php
Another possibility is that a plugin is misbehaving – so you can try disabling plugins – but before you do that – (if you have a lot of plugins certainly) try this next step first!
In my case the problem usually stems from the fact that I like to keep my WordPress files in their own directory, and then run the site itself in the root directory. However, if you view your site before you move it to the root diretory… the cookie that determines whether or not the admin bar should be displayed may have already been set – and it will be set to your WordPress directory – not the directory (or root) that your site is now living. The fix is simple: clear your cookies for your site, (which will effectively log you out too if you haven't logged out already) – log back in – and then it should be fixed.