• Resolved teksams

    (@teksams)


    Plugin works just fine for users who are not logged in, but with the Admin Toolbar active the built-in offset is not enough. Is it possible to increase this offset (i.e. keep the normal spacing for average users, but increase the distance by which it’s moved down for Admins)?

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • That should work when you have the option enabled in the plugin’s settings, but from what I can see, your BODY tag does not have any classes. Did you remove those with a function or with a plugin?

    Thread Starter teksams

    (@teksams)

    Your response isn’t clear; the problem I’m having is that the option is already enabled, but the bar doesn’t move down far enough to get out from under the Admin Toolbar.

    Admin Toolbar: 32px tall
    Navbar: 44px tall

    All I need is some way to increase the margin by which the navbar moves down, so that it’s not being covered.

    As far as I know, no one has removed any classes deliberately, and my browser shows that the body text does have at least one class.

    When you are logged in and you look at your site, does the BODY have a class “admin-bar”? This is a standard classname that should be applied to the BODY when an admin bar is visible. Without that classname, the plugin will not detect the admin bar properly, and your sticky element will not get the offset it needs.

    If you don’t see that classname, it’s either another plugin that’s removing it, or else I suggest you check this with your theme developer and ask them why that classname is not part of it.

    N.B. when I check your site now, I don’t see any classname applied to the BODY, which is not the standard way for a WordPress site:
    https://cld.wthms.co/KUK3F5

    • This reply was modified 6 years, 5 months ago by Senff - a11n.
    Thread Starter teksams

    (@teksams)

    Looking at the Admin Bar, it does not appear to have any classes. It does have the ID wpadminbar.

    Thread Starter teksams

    (@teksams)

    The BODY has the class ” customize-support” when logged itn

    Right, in that case, that won’t work properly with your theme.

    If the body does not have the class “admin-bar” when the admin bar is visible (which is a default functionality of WordPress), my plugin can not detect the presenc of the admin bar and won’t be able to add the required offset.

    You’ll need to either check this with your theme developer, or add the coding for that yourself. Once that classname is back, my plugin will work as intended.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Possible to Change Admin Bar Offset?’ is closed to new replies.