Archived topic
Sticky widget
9 replies · Started by Kristian on December 10, 2019
I want my first widget on this page https://steviaen.dk/stevias-bivirkninger-7-bivirkninger-ved-sukkerplanten-stevia/ to be sticky when scrolling down and still look good on mobile also.
Is there a smart way to do it without installing a plugin in Generatepress?
Hey Kristian, If you are looking to make your last widget sticky then here is the code
https://generatepress.com/forums/topic/how-to-make-last-widget-sticky-without-plugin/#post-1091588
I have tried it in my blog and it's working.
Thanks
Suraj - you just made my day, thanks for super fast reply - love this forum :)
Just added it to my CSS and it works like a charm.
Well, Thanks to the GeneratePress Admin/Staffs :)
Thanks Suraj!
Welcome :)
HI, I was wondering is this kind of sticky widget possible in GP. The main thing here is that widget content is customized for every post. https://bestofmachinery.com/greenworks-1600-psi-pressure-washer-review/
Hi there,
the method linked to above could be applied to any widget you want to specify. The content being dynamic shouldn't affect that.
I am so sorry, my question was more about how to make the content dynamic based on the post, for example, the content which is there is related to the post. I understood the sticky part.
You would need custom fields to store the post meta before thinking about how to display it. I would suggest looking into ACF to do this: