A powerful, lightweight Gutenberg block that automatically generates a linked, navigable table of contents from your post headings. Zero configuration. Just works.
Version 1.0.1 · GPLv2 · Works with WordPress 6.4+
Active Installations
Downloads
No -Star Rating
Built for simplicity, performance, and accessibility. No bloat, no lock-in, no tracking.
⚡
Drop the block into your content and it works immediately. No setup wizards, no complex settings pages.
🧱
Built as a real Gutenberg block with full inspector controls, live preview, and design system integration.
🪶
No JavaScript frameworks. Pure vanilla JS for interactivity. Minimal footprint, maximum performance.
♿
Proper ARIA attributes, keyboard navigation, semantic HTML, and focus management baked in.
🎨
Uses WordPress design tokens and CSS custom properties. Inherits your theme’s colors, fonts, and spacing.
🔒
No external requests, no tracking, no analytics, no cookies. Fully GDPR compliant out of the box.
Packed with smart defaults and deep customization when you need it.
Three simple steps. No configuration needed.
Upload the plugin through your WordPress dashboard or install directly from the plugin repository.
Open any post or page, click the block inserter (+), search for “Table of Contents”, and add it.
The TOC renders automatically with smooth scrolling, active tracking, and a responsive, accessible design.
Perfect for classic editor users, widgets, and PHP templates.
[mctoc]
[mctoc title="On This Page" numbering="nested" collapsed="true" sticky="true" offset="100" back_to_top="true"]
<?php echo do_shortcode( '[mctoc title="Page Contents" numbering="nested" collapsed="true"]' ); ?>
| Attribute | Default | Description |
|---|---|---|
title | “Table of Contents” | TOC heading text |
include_h2 | “true” | Include H2 headings |
include_h3 | “true” | Include H3 headings |
include_h4 | “true” | Include H4 headings |
exclude | “” | Comma-separated headings to exclude |
numbering | “none” | “none”, “decimal”, or “nested” |
collapsed | “false” | Start collapsed |
sticky | “false” | Enable sticky mode |
offset | “80” | Scroll offset in pixels |
skip | “0” | Skip first N headings |
back_to_top | “false” | Show back to top link |
From blogs to documentation to legal pages — it fits everywhere.
📝
Navigate 2,000+ word articles with ease.
📚
Technical docs, how-to guides, and reference pages.
🎓
Give learners a clear roadmap of every section.
⚖️
Terms of service, privacy policies, and compliance docs.
🍳
Readers jump to the section they care about.
♿
Reliable navigation for keyboard and screen reader users.
Yes. The block is dynamically rendered on the server every time the page loads, so it always reflects the latest content.
H2, H3, and H4. You can toggle each level on or off independently in the block settings.
Yes. In the block settings or via the shortcode exclude attribute, provide a comma-separated list of heading texts to omit.
The TOC block simply doesn’t render. No empty box, no broken layout.
Yes. The [easy_toc] shortcode works in the classic editor, widgets, and theme templates.
No. Everything runs entirely on your server. Fully GDPR and privacy compliant.
Development was supported by Telex AI by Automattic. The plugin is fully human-reviewed, tested, and maintained.
Download for free, install in seconds, and give your readers the navigation they deserve.
Table of Contents by Mocursor · Version 1.0.1 · GPLv2 or later