Description
Tidy Table of Contents automatically generates a clean, accessible table of contents from your headings. It works out of the box with no configuration, and offers deep customization when you need it.
Key features:
- 🤖 Automatic — parses H2–H6 headings and generates the TOC instantly
- ♿ Accessible — proper ARIA roles, keyboard navigation
- ⚡ Performant — output cached per post, no render-blocking JS
- 🎨 Customizable — configure depth, position, title, open/collapsed state
- 📌 Per-post control — override global settings via meta box
- 🔗 Smooth scroll — animated anchor navigation
- 📱 Responsive — collapsible on mobile
- 🧩 Shortcode —
[tidy_toc]for manual placement
Blocks
This plugin provides 1 block.
- Table of Contents Display an automatic table of contents generated from your headings.
Installation
- Upload the
tidy-table-of-contentsfolder to/wp-content/plugins/ - Activate the plugin through the Plugins menu in WordPress
- The TOC will appear automatically above the first H2 heading in your posts
- Configure global defaults under Settings Tidy TOC
FAQ
-
Which heading levels are included?
-
By default H2 and H3. You can configure the minimum and maximum heading depth in the settings.
-
Can I disable the TOC for a specific post?
-
Yes. Each post has a meta box where you can disable the TOC or override global settings.
-
Does it work with the block editor?
-
Yes. The TOC is generated server-side from the rendered post content, so it works regardless of how the post was written.
-
Does it slow down my site?
-
No. The TOC output is cached per post and invalidated automatically when the post is updated.
-
Can I place the TOC manually?
-
Yes. Use the
[tidy_toc]shortcode anywhere in your content, or disable auto-insertion in the settings.
Reviews
There are no reviews for this plugin.
Contributors & Developers
“Tidy Table of Contents” is open source software. The following people have contributed to this plugin.
ContributorsTranslate “Tidy Table of Contents” into your language.
Interested in development?
Browse the code, check out the SVN repository, or subscribe to the development log by RSS.
Changelog
1.0.7
- Replaced the grid-template-rows collapse trick with a max-height transition. The grid trick would refuse to fully collapse in some themes, leaving a residual strip with the first row of items partially visible. max-height: 0 hides the body cleanly.
1.0.6
- Fixed the collapsed state leaving a visible padding strip under the header. The body wrapper is now
box-sizing: border-boxso its padding is included in the collapsed height (full collapse, no leftover band).
1.0.5
- TOC item sizes inherit from the active theme again (reverts the explicit
remfallback added in 1.0.4). - Title bumped to 1.25rem so the SOMMAIRE label stays clearly readable as a header above inherited link sizes.
1.0.4
- Fixed the toggle button picking up theme button styles (coloured background, padding, hover gradient) — the “Table of Contents” header now reliably renders as a plain text label across themes.
- Hardened TOC item font sizes against context shrinkers (sidebar, nav, .entry-content ul). Sizes are now expressed in
remso they track the theme’s root font size while staying isolated from nested overrides.
1.0.3
- Default insertion position is now “After first paragraph” (was “Before content”) — better reading flow on a fresh install.
- Removed hardcoded font sizes from the front-end stylesheet (base, title, H2/H3/H4 link sizes). The TOC now inherits typography from the active theme.
1.0.2
- Removed all rendering code for premium-only features (sticky positioning, “custom” theme with color/radius/border options, reading-time badge). The free plugin now exposes only the three documented free themes (Minimal, Card, Outline) — no hidden capabilities behind add-on hooks.
1.0.1
- Removed all licence checks and premium-feature gating from the free plugin code (premium features are now distributed via a separate companion plugin).
- Hardened JSON-LD output with JSON_HEX_* flags to prevent script-tag breakouts.
- Removed the now-unnecessary
load_plugin_textdomain()call (handled by WordPress.org translation system since WP 4.6). - Added extension hooks for add-on plugins (settings defaults/sanitisation, render options, shortcode atts/headings, settings page, admin/front localized data, plugin row links).
1.0.0
- Initial release — automatic TOC generation, caching, accessibility, per-post control.
