-
Hi,
I try to add a table of content to my posts, but when I use a content template the plugin doesn’t work.
any idea why?
I added the post for example in the private message, the table of content is in the sidebar.
-
Fernando
Hi Galliaeran,
This is a single Post page. Is there any reason why you would use a Content Template here?
Content Templates are meant for archive pages. It also overrides the default Template.
If your plugin hooks the ToC through the default template hooks, it won’t work if you have a Content Template.
You’ll need to hook it manually. Is there a Shortcode for your ToC?
-
I try to use a content template with ACF.
there’s no shortcode in the plugin.
-
Fernando
I see. We can’t hook the ToC then. You can try looking for a ToC plugin that has a Shortcode so we can inject it into your Content Template.
Otherwise, you’ll need to do away with the Content Template, and just hook the ACF field through a Block Element – Hook instead.
-
look, in this video he did content template + used the plugin – https://www.youtube.com/watch?v=e2LWkW34YBA&t=207s
-
Fernando
I see. You’re using simpleTOC. You mentioned simpleTOV which I assumed was a different plugin working in a different way.
What you have should work.
Can you try #1 here to debug: https://docs.generatepress.com/article/debugging-tips/
It’s recommended to backup your site before proceeding with this.
-
I don’t understand how to Turn on WP DEBUG
-
Fernando
Just do step #1 – the plugin disabling part. Just leave SimpleToC and GPP and GB activated.
Have you tried it? How did it go?
-
it didn’t work.
-
Fernando
I see. Can you create a test Post, add any content(make sure this is long with Headline Blocks for testing purposes), and create a Content Template for it? Add the Simple Toc and a Post Content Block.
Let us know how it goes with this test.
-
it didn’t work because I think I put the content in the ACF text area
-
Fernando
Can you provide admin login credentials through the Private Information field? I’ll try to check what’s going on.
-
Sure.
I need email
-
Fernando
You can use this: [hidden]
-
I added the user information in the private message
-
Fernando
Can you reshare the site link along with that?
- You must be logged in to reply to this topic.