Archived topic
Sticky Sidebar
38 replies · Started by kane on July 7, 2015
How might I modify the script to make multiple ID's sticky on the page? I have several different elements that I would like to stick throughout the site, and not all of them use the sidebar.
You might need to use a custom script for that - making multiple element sticky gets quite complicated as they need offsets etc..
Hello Tom i used jQuery method and it doesnt work could you help me out to make it work?
http://thefinterestcom.kinsta.cloud/travel/exploring-the-beaches-of-bali/
1. i made a js folder inside child with the 2 js files required
2. i copied the code on my function.php
3. i made a hook on footer with the jquery code
Is this method too old to work?
Might be. This is the plugin we would recommend and it should still work well:
https://en-ca.wordpress.org/plugins/sticky-menu-or-anything-on-scroll/
Thanks Leo, i tried it and it doesnt work correctly it take my left-sidebar and puts it way out of position... Nevertheless maybe we can get Tom's opinion on this as to maybe we get this done without plugin? I would really prefer it that way if possible!!!
The jQuery method is super out-dated, it won't work.
That plugin should work if you choose the right element. What if you use #left-sidebar as the selector?
Its ok i have found a plugin if the jquery wont work, thank you!!
Can you tell me if it is possible to offset it to have an x padding from the bottom everytime?
http://thefinterestcom.kinsta.cloud/uncategorized/hello-world/
Any chance you can open a new topic for your question?
Thanks.