- This topic has 28 replies, 3 voices, and was last updated 6 months, 1 week ago by
David.
-
AuthorPosts
-
July 7, 2020 at 4:21 am #1355017
Simone
Hi
I uploaded the table of content plus plugin and the sticky widget. How can I add a post to the widget section so I can associate the table of content to my post in the sidebar?
I hope I explained my self cleary:)
July 7, 2020 at 6:10 am #1355116David
StaffCustomer SupportHi there,
the Table of Contents plugin should automatically create the TOC for each post.
Simply add the plugins shortcode[TOC]
to a HTML Widget in Appearance > Widgets.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 7:12 am #1355202Simone
Hi David,
Thanks, do you mean the widget on the right sidebar of the home page? But then it’s not related to a specific post. How can I relate to a specific post and not to all of them?
July 7, 2020 at 7:32 am #1355228David
StaffCustomer SupportThat shortcode should be dynamic and will display a TOC for the specific post being viewed – is that not the case?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 7:59 am #1355425Simone
Not at all. When I put the code TOC in the widget sidebar on my home page, this widget appears on every post.I might do something wrong
July 7, 2020 at 8:18 am #1355448David
StaffCustomer SupportSo – do you only want this to be displayed on specific posts?
If so can you add it to a Post ( inside the post editor using a Shortcode Block ) and send me a link to where i can see it.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 8:25 am #1355457Simone
Yes, I want to put the code to a specific post. I send you a link to a website that uses your theme and the same plugins, but he succeeded to put the code on a specific post. I don’t know how he did that.
July 7, 2020 at 8:35 am #1355462David
StaffCustomer SupportThey built it in Elementor.
We can try this:1. Go to Appearance > Elements -> New Hook.
2. Add the toc shortcode.
3. Selectbefore_right_sidebar_content
hook
4. Check: Execute Shortcodes.
5. Set your Display Rules to the Post you want it displayed.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 8:39 am #1355465Simone
There is no new hook. I don’t find it. Also, I didn’t understand “Set your display rules to the post you want”
July 7, 2020 at 8:46 am #1355474David
StaffCustomer SupportYou need to create a new Hook Element:
https://docs.generatepress.com/article/hooks-element-overview/
Then follow those steps.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 7, 2020 at 12:30 pm #1355677Simone
Ok, thanks. Can you tell me where to find the code of the TOC? Or I can just write TOC on the hook?
July 7, 2020 at 12:36 pm #1355680Leo
StaffCustomer SupportThe hook just allows you to add the shortcode from TOC.
Not sure what code of TOC you are looking for but it might help with check with the plugin support on plugin-specific questions.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/July 8, 2020 at 4:13 am #1356281Simone
Hi
I found the shortcode, and I inserted it in the hook. Bit now I don’t know what to do next. What should I write on the hook? https://www.screencast.com/t/0IaQ89yF9Ih
July 8, 2020 at 5:10 am #1356331Simone
July 8, 2020 at 6:47 am #1356437David
StaffCustomer SupportIn your Hook Element:
1. Title field: name this whatever you want. Example: Table of Contents
2. Check: Execute Shortcodes
3. Select the Display Rules Tab – in Location select the Post ( or Page ) where you want it displayed.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.