WordPress Table of Contents Plugin (CMTOC) - Widget - Placing TOC In Widget Areas
Widgets
The WordPress Table of Contents plugin comes with two Table of Contents widgets which allow to place TOC in widget area instead of over post/page content.
To display Table of Contents in widget area, navigate to Admin Dashboard → Appearance → Widgets.

Using the search bar, you can find 2 TOC widgets:

Classic Widget
The CM Table of Contents - Show Table of Contents widget is static and has 2 settings:

- Title - This setting is optional. Enter here the widget title. Note: if you want to change the TOC title, you need to change it in the plugin settings.
- Post ID - This setting is optional. If it's empty, then each page will show its own TOC. Alternatively, you can define the post ID, and each page which show the TOC of the page that you define.
Open post/page edit page and check Enable Table of Contents... to enable searching TOC items (in case if it's not enabled for all posts of the selected type) and Disable automatic displaying... to hide standard TOC on this page. Update post/page.

Front-end Example:

Sticky Widget
Note: this widget was introduced in version 1.6.0.
Unlike the previous widget, the CM Table Of Contents - Show Sticky Widget Table of Contents allows to show the widget while the user is scrolling through the content.
When adding this widget to any widget area, it does not have any settings:

However, you can configure it in the plugin settings. To do it, navigate to Admin Dashboard → CM Table of Contents Pro → Settings → Table of Contents tab.

Scroll down and find the section Sticky Widget settings. It has the following settings:

- Title for sticky widget - Change the TOC title in the sticky widget.
- Sticky widget border color - Choose the border color for the sticky widget.
- Border width for the sticky widget - Choose the width of the border.
Front-end Example:

Auto-Expand Feature
Another useful feature that you can use together with the Sticky Widget is Auto-Expand feature (note: this feature was introduced in version 1.6.0). By default, all chapter in TOC are collapsed, and while the user is scrolling through the relevant chapter, its subchapters are automatically expanded. And when the user passes these chapters, they're automatically collapsed.

To enable this feature, head to the Table of Contents tab in plugin settings. Find and enable the option Auto expand/collapse sub-chapters under the General Settings section.

![]() |
More information about the WordPress Table of Contents Plugin Other WordPress products can be found at CreativeMinds WordPress Store |
![]() |
Let us know how we can Improve this Product Documentation Page To open a Support Ticket visit our support center |