Tocnest helps readers find their way through long articles. Add the Tocnest block in the editor, or let automatic insertion handle your posts. All features are included, without accounts, license keys or upgrade notices.
[lwptoc] shortcodes and saved blocks, undo snapshot protection, and a batched AJAX converter (200 posts per request) for per-post metadata overrides without modifying post content in the database.apiVersion: 3) with Inspector controls and live server-rendered preview, plus automatic duplicate suppression when a manual block or shortcode is present.<nav> markup: Uses semantic <nav> and nested <ol>/<ul> lists, aria-expanded and aria-controls toggle state, aria-current="location" active section tracking via IntersectionObserver, keyboard focus management, and prefers-reduced-motion support. If JavaScript is disabled, the table of contents stays open and every link works.-2, -3 suffixes on collision.[tocnest] shortcode and a classic widget.tocnest-skip class always excludes a heading.Tocnest only loads its small CSS and vanilla JavaScript when a TOC renders. Tocnest renders on singular post views. Password-protected posts, excerpts, feeds, public REST/JSON requests and nested content filters never expose a TOC. The authenticated block editor preview is supported.
No data is collected or sent anywhere. Tocnest performs no external requests and loads no remote assets. Settings and per-post overrides stay in your own database. Uninstall removes Tocnest settings, import backups and reports, the detection cache and Tocnest per-post overrides from each site. Previous plugin data and post content are preserved.
Import settings from the LuckyWP Table of Contents plugin through Settings > Tocnest > Import. Tocnest is independent and is not affiliated with that plugin or its authors.
The old contents block remains editable as a compatibility block. To use the new Inspector, replace it with a Tocnest block; no editor conversion step is required for existing content to render. Existing legacy widget instances (id lpwtoc_widget) are not changed automatically; replace those widgets with the Tocnest block or classic widget.
While both plugins are active, a notice appears only on this settings page and Tocnest pauses automatic insertion when the previous auto insertion is enabled. Advanced settings offers an explicit override.
Mapping details: excluded h1-h6 levels are preserved; depth remains relative nesting depth. All five numbering styles, three suffixes, five positions and five schemes map directly. Font weight names map to CSS 100 through 900. Default font sizes become 1em. The rightwithoutflow float becomes a standard right float and div lists become accessible ul lists. Pipe-separated skip patterns honor escaped pipes and become one pattern per line. The asheadingwotransliterate anchor format preserves original characters. Unknown enums fall back to Tocnest defaults. wrapNoindex is unsupported and reported as skipped. Null or missing per-post values inherit global settings.
Filters:
Actions: tocnest_before_render ($post, $settings) and tocnest_after_render ($post, $settings) run around successful rendering. Use them for integration side effects; filter tocnest_html to alter output.