[Support request] Associate my post to table of content in the side bar

Home Forums Support [Support request] Associate my post to table of content in the side bar

Home Forums Support Associate my post to table of content in the side bar

Viewing 15 posts - 1 through 15 (of 29 total)
  • Author
    Posts
  • #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:)

    #1355116
    David
    Staff
    Customer Support

    Hi 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.

    #1355202
    Simone

    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?

    #1355228
    David
    Staff
    Customer Support

    That shortcode should be dynamic and will display a TOC for the specific post being viewed – is that not the case?

    #1355425
    Simone

    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

    #1355448
    David
    Staff
    Customer Support

    So – 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.

    #1355457
    Simone

    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.

    #1355462
    David
    Staff
    Customer Support

    They built it in Elementor.
    We can try this:

    1. Go to Appearance > Elements -> New Hook.
    2. Add the toc shortcode.
    3. Select before_right_sidebar_content hook
    4. Check: Execute Shortcodes.
    5. Set your Display Rules to the Post you want it displayed.

    #1355465
    Simone

    There is no new hook. I don’t find it. Also, I didn’t understand “Set your display rules to the post you want”

    #1355474
    David
    Staff
    Customer Support

    You need to create a new Hook Element:

    https://docs.generatepress.com/article/hooks-element-overview/

    Then follow those steps.

    #1355677
    Simone

    Ok, thanks. Can you tell me where to find the code of the TOC? Or I can just write TOC on the hook?

    #1355680
    Leo
    Staff
    Customer Support

    The 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.

    #1356281
    Simone

    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

    #1356331
    Simone

    Hi
    I followed exactly the same steps you sent me and it doesn’t work. Please see screenshots

    https://www.screencast.com/t/KC5PYhekidm
    https://www.screencast.com/t/j5L8Xqabp
    I also set my article on content/right sidebar and it doesn’t appear.

    I tried to put a picture n the side. But also doesn’t work.

    #1356437
    David
    Staff
    Customer Support

    In 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.

Viewing 15 posts - 1 through 15 (of 29 total)
  • You must be logged in to reply to this topic.