• Resolved cristina_pop

    (@cristina_pop)


    Hello and thank you for your work with this plugin!

    I thought it was working fine until I noticed that the .cloned element is visible all the time and the .original element is always hidden, without any scrolling, when I’m not logged into the site. This is a problem because I have added some extra styling in the css file for the .cloned element and its children, in order for it to take up less space than the .original element.

    When I am logged in, the .original element shows at first and the .cloned one only when I scroll down, which is the way I want it to work.

    Do you know how I could solve this issue?

    https://wordpress.org/plugins/sticky-menu-or-anything-on-scroll/

Viewing 15 replies - 1 through 15 (of 23 total)
  • Is there a way I can see this issue for myself? Perhaps with a temporary login so I can see the difference between being logged in and not logged in?

    Thread Starter cristina_pop

    (@cristina_pop)

    Wow, you’re fast and helpful! πŸ™‚

    Will you give me an e-mail address to create a user for you? Or can I somehow privately send you the access info?

    Please shoot me a message through the contact form on http://www.senff.com with the site information as well as a username and ID.

    Please give me as little rights as possible, I probably don’t need full admin access.

    Thanks! πŸ™‚

    Thread Starter cristina_pop

    (@cristina_pop)

    I’ve just created a subscriber account and sent you the info through the contact form. Thank you for looking into it!

    Right, I can see what the problem is.

    When not logged in, there is no admin bar at the top of the screen. Therefore, the header is already at the top so it will always be sticky. The original will never show, and it will always show the clone.

    When logged in, there is the 32-pixel high adminbar, so the header will only reach the top of the screen (and become sticky) when you’ve scrolled 32 pixels down — so in this case, the original and the clone come into play.

    To be honest, in this particular situation, I don’t really see the need for the Sticky Anything plugin in the first place. Why don’t you make the header always sticky (without the use of the plugin)? If it always needs to be at the top of the screen, there is no need to scroll a bit first before it becomes sticky. Does that make sense?

    If you disable the plugin and make the header sticky (using position: fixed and a few other styles regarding position and size), as well as giving the .site-main a bit of top padding (115 pixels, I believe), then that’s pretty much all you need.

    If you insist on using the plugin, then a few modifications are needed. This would take me a little bit of time and of course, these would be overwritten again as soon as there is a new update to the plugin.

    Hope this made sense a bit?

    Thread Starter cristina_pop

    (@cristina_pop)

    Yes, it makes sense. I don’t feel confident with implementing the sticky feature myself because I also want it to have some different styling when you go lower on the page and js is definitely not my forte. But the problem is solved if I put a bit of padding to the top of the body, so I’ll go with this.

    Thank you very much for the help, you rock! πŸ™‚

    Yea it’s a bit silly to help you with the plugin by saying “don’t use it!” but in this case I don’t see the immediate need for it. Keep it simple πŸ™‚

    I understand your need for it though, and it makes me wonder if I should implement additional functionality that accounts for the admin bar being present or not. Maybe in a future version!

    Thread Starter cristina_pop

    (@cristina_pop)

    Well I am using it, I just added a 1px padding at the top of the body, and now it all works as I need it to πŸ™‚

    Oh! Yea that would be an option too, but personally I don’t like to add that as it’s a little hacky. But I’m a perfectionist. πŸ˜‰

    Thread Starter cristina_pop

    (@cristina_pop)

    I’m a recovered perfectionist, so I can stand 1px πŸ˜‰

    But if future versions of the plugin will work without this little hack, I will of course be happy and grateful πŸ™‚

    @cristina_pop can you please send me a message through my contact form at http://www.senff.com/contact

    I have a beta version for the plugin available that improves upon the functionality for logged in users vs. non-logged in users, and I would like you to test it for me.

    Hi, I just encountered the same issue.

    My use case: I want the top header/menu to stay on top when the user scrolls down to the content, but the logo and other visuals to become smaller.

    I applied some CSS to the .cloned version of the header, and as long as I’m logged in, this works fine.

    But when logged out, I doesn’t work, because the .cloned version loads immediately…

    Manuel, could you try the new version that I have available here?

    https://github.com/senff/Sticky-Menu-or-Anything-On-Scroll-WP/archive/master.zip

    It’s not for public release yet (still a tiny bit of testing to do) but I believe it should solve your problem. There is a new setting in it (“Check for admin toolbar”) that you should check.

    Thanks Mark, I just tested the new version:

    – If I disable the “Check for Admin Toolbar” option, the behavior is as before: *with* admin bar for logged in users, scrolling toggles between the “default” and the “cloned” header, as expected. For visitors without admin bar, they only see the “cloned” header.

    – If I activate the “Check for Admin Toolbar” option, the behavior is now the same for everyone: both visitors and logged-in users see only the “cloned” header, the original header is immediately hidden upon pageload.

    So the new behavior is actually the opposite of what I’m looking for :-/

    Would you be able to share a link to your site so I can see how it works and investigate?

Viewing 15 replies - 1 through 15 (of 23 total)
  • The topic ‘Cloned sticky element shows without scrolling when I'm not logged in’ is closed to new replies.