The table of contents is generated automatically on the base of the document headings these auto insertion works only when the_content() has been used
1. First go to WordPress dashboard -> Settings -> TOC+ -> Main options. check this two option. click on save button.
2. Enter on Your Information Post or page. After, Click on “Publish”.
The output Table of content in AMP:
The shortcodes allow you to fully control the position of the table of contents within your page. The following shortcodes are available with this plugin. If you use the blow the shortcode it will work in AMP.
you want to generate the table of contents at the preferred position. where want to display a table of contents you need to add this shortcode in your page.
Allows you to disable the table of contents for the current post, page, or custom post type.
That’s it for this tutorial!
We hope it helped you. If you have any feedback or questions, then please share them in the comments section below.