• Resolved Julian M.

    (@jmagnone)


    I am trying to display the TOC in the sidebar, only for posts that I specifically choose to.

    I tried running the shortcode in the sidebar, by editing the theme manually, but the output is empty, even if I checked the options and it should be added for the post (I also tested adding it at the beginning of the post, and it worked), but the shortcode in the sidebar renders it empty.

    I assume the problem is that the content is being processed earlier, before the sidebar. And since the plugin code (from what I could read) look for <!–TOC–> to render it, this is missed, and the output is empty.

    Here is what I added to the sidebar:

    echo do_shortcode( '[toc]' );

    How can I display the TOC in the sidebar? Any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Prabhat

    (@prabhatrai)

    Hi @jmagnone,

    Thanks for reaching out, and I apologize for the issue you’re facing!

    I’m Prabhat from the All in One SEO team. We’ve recently adopted the Table of Content Plus plugin after the original owner indicated he no longer had the bandwidth to maintain it.

    I’m sorry, but Table of Content Plus currently renders only when added inside the post content area, since it has to fetch the individual headings on the post. It currently doesn’t work on the Sidebar or any other section outside the content area.

    However, I’ve added an internal feature request for our Development team to take a closer look. I’m sorry I can’t be more specific about when we might add this, but I’ll ensure to notify you when we have an update.

    Feel free to let me know if there are any other details you’d like me to pass along.

    Thanks!

    Plugin Support Prabhat

    (@prabhatrai)

    Hi?@jmagnone,

    Adding to my last reply, although the short code doesn’t render in the Sidebar, depending on how you’ve implemented the sidebar, you may use our TOC+ widget to render the TOC.

    This widget can be accessed under WordPress Dashboard > Appearance > Widgets. Here’s a screenshot for a quick reference –

    https://a.supportally.com/i/13nWNp

    Please let me know if you have any questions.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.