Fast TOC is a WordPress plugin that generates a table of contents from the headers in your post.
Installing and basic working
After you selected the post types you want to have a table of contents in the settings, you can (de)select it for each separate post in the Gutenberg document sidebar.
A TOC is generated by scanning all the header elements (H1 until H6) in the post. By default it is placed on top of the page, but you can specify a different position by using the fast-toc shortcode or by setting the TOC selector.
The 'my-visible' class is attached to each item in the TOC list when the linked header is visible.
Go the the Settings / Reading section after installing the plugin. There you can setup the plugin. Below all settings are explained.
Select the post types you want to have a table of contents. If you don't select a specific post type, no TOC option is presented for this type of post.
Enable Fast TOC by default for all selected post types. When this option is selected, a TOC is displayed by default for all selected post types. You can however disable a TOC for each separate post.
If you leave this blank, your post content will be wrapped inside a DIV element. If you don't want this, enter here the CSS selector of the root element that wraps your content. For example for some default WordPress themes this selector is
The CSS selector of the element the TOC will be attached to. If you leave this blank, the TOC will be placed at the top of the page OR in the place with the shortcode.
You can optionally specify a CSS selector for headings you don't want to include in the TOC. This can be handy when you use other plugins to show content and they use header elements (H1, H2, etc.).
Optionally specify a title above the TOC.
Minimum number of headers
If there are less then the specified number of headers, no TOC is displayed.
Enable or disable collapsing of items and subitems.
Enable or disable collapsing of the TOC.
Back to top
Enable or disable the "back to top" arrow in the right bottom corner.
Select this if you want to show header numbers (or bullets) next to the header titles.
This is the style of the numbering (or bullets). Some valid values are decimal, decimal-leading-zero, lower-roman, arabic-indic, etc. See a demo page with more valid values.
Select this if you want the subitem numbering to be nested.
Example nested numbers
1. Header 1 2. Header 2 2.1. Header 2.1
Example non-nested numbers
1. Header 1 2. Header 2 1. Header 2.1
Nested number separator
The character that separates the nested numbers, can be anything but is a dot "." by default.
You can optionally place a shortcode inside the post to specifiy a different position than the default one which is at the top of the post.
The shortcode is: