CM Table of Contents (CMTOC) - How To - Manually Place the Table of Contents Within a Page
Manually placing Table of Contents within Pages / Posts
Back to User Guides
By default the Table of contents is generated at the very top of the Page or Post where it is displayed. There are some occasions when you might prefer to place it somewhere else on the page as well as or instead of at the top. To do this we use the following shortcode. (available in the Table of Contents section of the page editor just below the text editor input area.
Although placing this shortcode in the content using the Visual editor will normally work it is advisable to switch to the plain text editor before attempting to use this.
Scroll through the content until you reach the place where you would like to display your second (or third, or fourth...) Table of Contents. In this case we'll place another one at the very bottom to make content navigation a little easier.
Paste in the shortcode given above, remember the square brackets.
Update button on the right to save the changes.
Now we have a Table of Contents at the top of the page by default and also one at the bottom of the page that we have placed manually.
Hiding default Table of contents (at the top)
Should you wish to only display the manually positioned Table of Contents using the shortcode and to hide the default table of contents automatically displayed at the top the process is very simple.
On the page editor for the page that you wish to hide the default automatic display scroll down to the
CM Table of Contents - Custom Selectors
section below the text editor.
Check the box beside the option:
Disable automatic display of TOC at top of content
Scroll up a little and click the
button to save the changes.