WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've created a sticky menu but its hidden behind the WordPress Toolbar when logged in. How do i move it below the toolbar when enabled and logged in?

I was looking for a conditional tag but couldn't find one for this. I guess there's a WordPress hook or filter that i could use.

share|improve this question

I assume you mean on the admin bar on the front end, that show up for logged in users.

The body_class function inserts a class called admin-bar when that is present. The admin bar is 28px high. You should be able to use that body class to conditionally relocate your sticky menu.

share|improve this answer
body.admin-bar div.sticky.fixed { margin-top: 28px; }
share|improve this answer
Please explain your code rather than just post the code itself. – s_ha_dum Oct 11 '13 at 21:18

The best way to go about doing this is to simply move the admin bar to the bottom with this plugin. Its so simply, clean and less confusing. I use it for all my sticky menu sites.

LINK: http://wordpress.org/plugins/stick-admin-bar-to-bottom/

I know this doesnt "exactly" answer your questions buts its a great alternative.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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