Archived topic
Add automatic jump mark menu to sidebar
6 replies · Started by Cathrin on July 22, 2022
Dear GeneratePress-Team
I want to add a left sidebar with the sub-headlines of the blog as jump marks in the left sidebar to make navigation through the blogpost easier.
I am not sure how to implement this?
Your help is highly appreciated.
All the best,
Cathrin
Hi Cathrin,
Do you mean a table of content?
The easiest way is to use a table of content plugin.
Yes, that is what I mean!
Ah I see! Thank you, I will try that. And I can use that in the widget area?
It depends on how the plugin generates the table, it usually can be added in using a widget or a block element - hook.
Great thank you. I got that to work.
Last question - I am trying to make this sidebar sticky on scroll. However it doesn't work. It does work when I set the position to fixed.
My current code that is not working:
@media(min-width: 769px) {
.scroll_detail {
position: -webkit-sticky;
position: sticky;
top: 0px;
}
}
Thank you!
Try this, if you are using right sidebar, change the leftto right.
@media (min-width: 769px) {
.left-sidebar .inside-left-sidebar {
position: -webkit-sticky;
position: sticky;
top: 0px;
}
}