WordPress Table of Contents Plugin (CMTOC) - How To - Highlight Active Title
How to Highlight Active Title
Note: Features covered in this guide were introduced in version 1.5.5 of the WordPress Table of Contents plugin.
The plugin allows to highlight the active title while scrolling the page. It's supported by Floating TOC and static TOC.
Front-end Example
When using Floating TOC, the relevant title will be highlighted when the user is viewing any chapter in the article. Learn more about How to enable and configure Floating TOC.
When you use a static TOC, it can be displayed not only at the top of the article, but anywhere within the post using a shortocode. The active title feature can be useful, for example, in case if you place a TOC at the beginning of every chapter. This way, the current title will be highlighted. Learn more about Manual placing a TOC withing the content.
Setting Up
To configure it, navigate to Admin Dashboard → CM Table of Contents Pro → Settings → Table of Contents tab.
Under the General Settings section you need to find the following options:
- Active title - Enable this option to highlight the title of the chapter which the user is currently viewing. It will be displayed constantly while the user scrolls through the conent, and the currently viewed chapter will be highlighted in TOC.
Active title custom CSS - Add your own style for the currently viewed title.
Example of Using Custom CSS:
For example, we can change the font-size and change the color by adding the following CSS parameters: font-size:25px; color:red;
Floating TOC:
Static TOC displayed with a shortcode:
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 |