• Resolved dajanas

    (@dajanas)


    Hello,

    Is there a possibility to make the shortcode [toc] functional? So that you can set all settings in WordPress, say “Please use shortcode” and you can use [toc] to place the table of contents where you want it to be displayed? That would be much more flexible and better.

    I know from another post that [toc] is still available for backward compatibility reasons – but it doesn’t work as it should.

    What would be a reasonable reason not to support the shortcode? There is nothing against it, but practically everything in favor of it?

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • Steven

    (@shazahm1hotmailcom)

    RE: Is there a possibility to make the shortcode [toc] functional? So that you can set all settings in WordPress

    Sorry, no, the [toc] shortcode is a legacy feature and additional options will not be added to it for applying settings.

    RE: you can use [toc] to place the table of contents where you want it to be displayed?

    Correct, this is how the shortcode works. The TOC will display where the shortcode is added to the post.

    RE: What would be a reasonable reason not to support the shortcode? There is nothing against it, but practically everything in favor of it?

    The shortcode is being replaced with a block in the new Post Block Editor in WordPress.

    Thread Starter dajanas

    (@dajanas)

    Correct, this is how the shortcode works. The TOC will display where the shortcode is added to the post.

    But it does not work. The table appears, but no click works. Nothing is happening, because no “IDs” for the headlines are set when using the shortcode. So it is worthless.

    Steven

    (@shazahm1hotmailcom)

    If that is the case, then a plugin or perhaps combination of theme and plugin(s) are preventing the in page anchors from being inserted.

    Perhaps give the TOC+ plugin a try since it has the same shortcode plus config options that can be set via shortcode options. That may be a better fit since you wish to use a shortcode.

    I hope this helps!

    Thread Starter dajanas

    (@dajanas)

    Alright, I am now using TOC+ – with success. Thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode [toc]’ is closed to new replies.