Archived topic
How to set up Fixed TOCs like this in GP?
2 replies · Started by Trạng on June 14, 2021
Dear supporter,
How can I set up Fixed Tocs like this (Screenshot here)? It means the TOCs is fixed in right section while keeping content focus area is narrow centered in 800px.
Demo site I want to be like: https://www.authorityhacker.com/amazon-associates/
Here is what I did:
I've set the sidebar to fixed, I use the simple css plugin to add css globally.
#right-sidebar {
width: 300px;
}
body:not(.no-sidebar) #primary {
width: calc(100% - 300px);
}
Then I've set up the theme to use a sidebar in the customizer, but removed all widgets from it.
Next I've created a block template for the right sidebar and have added the TOC from Kadence Blocks. There's one caveat though, Kadence and all other TOC blocks I've tried won't pick up GenerateBlocks Headlines in general, you have to use the default heading block for your headings.
I hope that the GP team adds some kind of headline fetching abilities for creating custom TOCs and linking to content sections with icons etc.
I Hope this helps.
Thanks Lilo for your input.
Hi Trang, the process is very much as Lilo has said, if you can provide a link to your site then i can take a look at the current layout and provide some advice.