Hey there,
My sidebar comprises two elements – the first element is a hook (generate_before_right_sidebar_content) and then there is a second element which is a Block (right-sidebar). I would like to make the second element (the right-sidebar) block sticky, but not the first. So you scroll past the first then the second stickys.
I have been successful stickying the entire sidebar using the following:
.inside-right-sidebar {
position: sticky;
top: 80px;
}
BUT this stickies the hook as well.
I have also been successful just stickying a section if I use the sidebar widget, e.g.:
aside#block-7{
position: sticky;
top: 80px;
}
BUT this means I can’t have multiple sidebar designs for different sections of my site.
Is there an easy way to target the specific element? I have tried but no luck yet. Thanks in advance!