Devmont TOC Navigator
Add a fast, accessible table of contents with a collapsible header, scroll spy, block, and shortcode.
Install in
Devmont TOC Navigator makes it easy to add a clean, accessible table of contents to your posts and pages.
Features:
– Shortcode [dtocn_toc] and Gutenberg block
– Sticky TOC with smooth offset scrolling and active link highlighting
– Collapsible header with rotating icon
– Fine-grained styling controls (Header, Links, Container)
– Inline CSS generation for optimal performance
– Sanitized settings and safe escaping following WordPress standards
Shortcode
[dtocn_toc]
Attributes:
– heading_levels: Comma-separated list of headings to include (e.g. h2,h3,h4). Default: h2,h3
– float: none | left | right. Default: none
– toc_sticky: yes | no. Default: no
Example:
[dtocn_toc heading_levels=”h2,h3,h4″ float=”right” toc_sticky=”yes”]
Block
Adds a “Devmont TOC Navigator” block with the same options as the shortcode.
Accessibility
- Uses semantic buttons and aria attributes for the accordion toggle
- Screen-reader-only label for the heading level data
Written by Joobi from the project's own listing. See the source page
1.0.3
- Compatible with WordPress 7.5.
- The shortcode is now [dtocn_toc], matching the plugin listing. [stocn_toc] still works.
- Admin menu, settings page and block now all use the name Devmont TOC Navigator.
- Settings page examples and copy buttons use [dtocn_toc].
- Heading IDs come from the heading text only, so adding or reordering headings no longer changes existing links. A number is added only when two headings have the same text. Headings in scripts such as Urdu also get IDs.
- CSS and JavaScript load only on pages that show a table of contents.
- Settings page: tabs, Copy buttons, the accordion, and color pickers work again, and the page styles apply. Minified CSS and JavaScript are rebuilt from the source files.
1.0.2
- Compatible with WordPress 7.1.
1.0.1
- Compatible with WordPress 7.0.
1.0.0
- Initial release.
Follow this listing's changes (Atom feed)