The WPFolks app is out on iPhone and Android. Free, no ads. Download on the App Store Get it on Google Play
Skip to main content
Login Join
Active installs
90+
1 rating
5.0
Last updated
3 months ago
Version
1.1.0
Tested up to
WP 7.1.5

About this plugin

Mocursor Smart TOC is a lightweight, feature-packed Gutenberg block that automatically generates a linked table of contents from the headings in your posts and pages. Simply drop it into your content — it just works. Also available as a [mctoc] shortcode for classic editor users.

The block is fully dynamic, accessible, lightweight, and theme-aware. It uses WordPress design tokens and CSS custom properties so it inherits your theme’s colors, fonts, and spacing automatically.

Shortcode Support

The Mocursor Smart TOC block is also available as a [mctoc] shortcode for use in the classic editor, widgets, or theme templates.

Basic usage:

[mctoc]

With options:

[mctoc title="On This Page" include_h2="true" include_h3="true" include_h4="false" numbering="nested" collapsed="true" sticky="true" offset="100" skip="1" exclude_headings="Related Posts,Comments" back_to_top="true"]

Available shortcode attributes:

  • title — TOC heading text (default: “Table of Contents”)
  • include_h2 — Include H2 headings: “true” or “false” (default: “true”)
  • include_h3 — Include H3 headings: “true” or “false” (default: “true”)
  • include_h4 — Include H4 headings: “true” or “false” (default: “true”)
  • exclude_headings — Comma-separated heading texts to exclude
  • numbering — Numbering style: “none”, “decimal”, or “nested” (default: “none”)
  • collapsed — Start collapsed: “true” or “false” (default: “false”)
  • sticky — Enable sticky mode: “true” or “false” (default: “false”)
  • offset — Scroll offset in pixels for fixed headers (default: 80)
  • skip — Number of headings to skip from the start (default: 0)
  • back_to_top — Show “Back to Top” link: “true” or “false” (default: “false”)

Ideal Use Cases

Mocursor Smart TOC is perfect for:

  • Long-form blog posts — Help readers navigate 2,000+ word articles with ease.
  • Documentation and knowledge bases — Technical docs, how-to guides, and reference pages.
  • Online courses and tutorials — Give learners a clear roadmap of every lesson section.
  • Legal, policy, and compliance pages — Terms of service, privacy policies, and similar documents.
  • Product and feature pages — Long product descriptions with multiple sections.
  • Recipe and travel blogs — Readers can jump to the section they care about.
  • Wiki-style internal sites — Any WordPress site used as an internal wiki or resource library.
  • Accessibility-focused sites — The TOC gives keyboard and screen reader users a reliable way to navigate.
  • Classic editor users — The shortcode works perfectly in the classic editor.

Why Choose Mocursor Smart TOC?

  1. Zero configuration needed — Drop the block in and it works immediately.
  2. 100% Gutenberg-native + Shortcode — Built as a real Gutenberg block with a classic shortcode fallback.
  3. Dynamic and always up to date — Server-rendered, always matches the current content.
  4. Incredibly lightweight — No JavaScript frameworks. Pure vanilla JS for all interactivity.
  5. Deeply customizable — Rich inspector controls for heading levels, numbering, collapsibility, sticky mode, and more.
  6. Accessible by default — Proper ARIA attributes, keyboard navigation, semantic HTML, and focus management.
  7. Theme-aware — Uses WordPress design tokens and CSS custom properties.
  8. No lock-in — Deactivate the plugin and your content is untouched.
  9. Privacy-friendly — No external requests, no tracking, no analytics, no cookies.
  10. Open source — Licensed under GPLv2.

Block Features

  • Automatic heading detection for H2, H3, and H4
  • Heading level filtering with individual checkboxes
  • Exclude specific headings by text
  • Skip first N headings option
  • Three numbering styles: None, Decimal, Nested
  • Collapsible TOC with configurable default state
  • Smooth scrolling with configurable offset
  • Active heading highlight via IntersectionObserver
  • Back to Top link
  • Sticky mode
  • Live editor preview
  • Full block editor design controls (colors, typography, spacing, borders)
  • Shortcode support with full attribute control

How to Use

Method 1: Block Editor

  1. Install and activate the plugin.
  2. Open any post or page in the block editor.
  3. Click the block inserter (+), search for “Mocursor Smart TOC”, and insert the block.
  4. Customize via the block settings sidebar.
  5. Publish — the TOC renders with smooth scrolling and active heading tracking.

Method 2: Shortcode

  1. In any post, page, or widget, type [mctoc].
  2. Optionally add attributes: [mctoc title="Contents" numbering="decimal" collapsed="true"].

Method 3: PHP Template

<?php echo do_shortcode( '[mctoc title="Page Contents" numbering="nested"]' ); ?>

Tips:

  • Place the TOC inside a Group block with a max-width for a contained look.
  • Enable sticky mode for sidebar layouts.
  • Use the shortcode in classic editor widgets or template files.

Analytics

Live from WordPress.org, refreshed daily. Last refresh Nov 30, 2026.

  • Passes every health check below.
3/3

Health checks

Everything a careful site owner looks at before installing.

  • Actively maintained Last release 3 months ago
  • Tested with current WordPress Tested up to 7.1.5
  • Support questions answered Nothing open in the last two months
  • Well rated Only 1 rating so far
Active installs
90+ −10% from 100+ a month ago
This week
32 downloads −30% vs the week before
Last 30 days
161 downloads 5 a day, typically
All time
2.1k downloads On WordPress.org since 2026
Downloads per week Every update counts as a download on WordPress.org, so release weeks spike.
Latest week
32
Typical week
31
Peak
714 Week of May 25
View as table
WeekDownloads
Week of Nov 2332
Week of Nov 1646
Week of Nov 936
Week of Nov 230
Week of Oct 2638
Week of Oct 1933
Week of Oct 1231
Week of Oct 532
Week of Sep 2833
Week of Sep 2128
Week of Sep 1444
Week of Sep 731
Week of Aug 3149
Week of Aug 24110
Week of Aug 1722
Week of Aug 1020
Week of Aug 321
Week of Jul 2714
Week of Jul 209
Week of Jul 1316
Week of Jul 617
Week of Jun 299
Week of Jun 2217
Week of Jun 1514
Week of Jun 829
Week of Jun 1456
Week of May 25714
Week of May 18166
Where it stands Rank among the plugins WPFolks tracks every day.

Not ranked yet. Install, download and rating ranks cover the 5,000 most popular plugins on WordPress.org, and Trending needs about 100 downloads on a typical day.

Active installs over time Recorded by WPFolks every day since Oct 14, 2026.

Reviews

5.0 1 rating on WordPress.org
  • 5 1
  • 4 0
  • 3 0
  • 2 0
  • 1 0

From folks on WPFolks

No reviews from folks yet. Used it? Be the first to say how it went.

Log in to leave a review

Latest on WordPress.org

[Mocursor Smart TOC] Great toc
dansart · June 2, 2026 · 1 reply

Nice plugin. Works well and it is easy to integrate. I would love to see an option to align the toc on the page. Currently it is in the middle, but it would be nice to be able to align it left or right.

Proudly supported by