Hi @mkremer12
Based on the above link you shared, you can try adding the following CSS in your additional CSS:
.camille_post_sidebar .widget_rp4wp_related_posts {
position: sticky;
top: 100px; /* Adjust this if needed */
z-index: 99;
}
.camille_post_sidebar,
.camille_post_sidebar .camille-container,
.camille_post_sidebar .widget-area {
overflow: visible !important;
}
The above code should work for your website.
Regards
Hello @mkremer12 I have reviewed your concern. you can try adding this CSS to make your related posts widget sticky:
.your-related-posts-class {
position: sticky;
top: 20px;
}
replace .your-related-posts-class with the actual class of your related posts widget. you can find this by right-clicking on the widget in your browser and selecting Inspect.
If it doesn’t work ensure, the parent container does not have overflow: hidden or overflow: auto.
May be the sidebar has enough height for sticky position to work.
Hi Meredith! 👋
You’re on the right track with position: sticky. To make your Related Posts widget sticky, try adding the following CSS to your theme’s Additional CSS section (Appearance → Customize → Additional CSS):
.related-posts-widget { position: sticky; top: 100px; /* adjust this based on your header height */ z-index: 100; }
Make sure:
- The widget’s container (
.related-posts-widget) doesn’t have a parent with overflow: hidden, scroll, or auto.
- You’ve applied this class either directly to the widget or via a wrapper div.
If you’re using a custom theme and the Related Posts plugin adds the content via a shortcode, you may need to wrap that shortcode in a <div class="related-posts-widget"> manually in your sidebar template or widget area.
Let me know if that helps — happy to assist further! 😊