Archived topic
how to make the container block (table of content) in left sidebar?
23 replies · Started by eran on August 19, 2022
Hi,
How can I make the Table of Content as a sidebar? without using a plugin?
Hi there,
GP doesn't have the TOC function unfortuanly, you will need a plugin for this.
I can create links with id.
Checkout my website
I think it takes too much time to manually create the TOC, are you ok with that?
If so, try using custom fields in your post to create titles, then you can use the dynamic option of headline block to pull the post meta as its content.
Too much time? I already did it.
Did you check my homepage?
Did you check my homepage?
I did and I know you've made one manually using GB.
I've replied with the possible solution to add the TOC in the sidebar, have you tried it?
nope. i dont know how to do that.
how i add the custum fields to my post?
Hi Eran,
You can use ACF: https://www.advancedcustomfields.com/resources/getting-started-with-acf/
Are you planning to add TOC on just your homepage or to posts as well?
I wanted to make it only for my homepage for now.
is there a way to do it without a plugin?
If it’s just for the homepage, without a plugin, what you did would be good.
But how i place it asa sidebar?
You can create a Block Element - Sidebar, and paste the TOC you manually created there. Then set it to display only in your homepage.
Reference to Block Element - Sidebar: https://docs.generatepress.com/article/block-element-sidebar/
I already did it but it didnt work
Can you provide temporary access? I’ll try to check why it isn’t working.
Im not at home right now