Title: TOCPilot — Table of Contents
Author: Ehtisham Ashraf
Published: <strong>November 29, 2026</strong>
Last modified: November 29, 2026

---

Search plugins

![](https://ps.w.org/tocpilot-table-of-contents/assets/banner-772x250.png?rev=3833094)

![](https://ps.w.org/tocpilot-table-of-contents/assets/icon-256x256.png?rev=3833094)

# TOCPilot — Table of Contents

 By [Ehtisham Ashraf](https://profiles.wordpress.org/buildwithehtisham/)

[Download](https://downloads.wordpress.org/plugin/tocpilot-table-of-contents.1.0.0.zip)

 * [Details](https://wordpress.org/plugins/tocpilot-table-of-contents/#description)
 * [Reviews](https://wordpress.org/plugins/tocpilot-table-of-contents/#reviews)
 *  [Installation](https://wordpress.org/plugins/tocpilot-table-of-contents/#installation)
 * [Development](https://wordpress.org/plugins/tocpilot-table-of-contents/#developers)

 [Support](https://wordpress.org/support/plugin/tocpilot-table-of-contents/)

## Description

TOCPilot — Table of Contents helps readers navigate long posts and pages. It builds
a nested list of links from your headings and inherits your theme’s fonts and text
colors.

Use automatic insertion, place the Table of Contents block in the editor, or add
the [tocpilot] shortcode. A manually placed block or shortcode suppresses automatic
insertion for that post.

#### Features

 * Gutenberg-first: the editor preview updates as you add, edit, or move headings,
   including headings inside groups and columns.
 * Classic editor support through heading extraction from HTML.
 * Automatic insertion before the content or after the first paragraph.
 * Choose public post types, the heading range from H1 to H6, and an automatic insertion
   threshold from 1 to 50 headings.
 * Nested bullet lists, numbered lists, or lists without markers.
 * An optional Show / Hide button; contents start expanded and remain readable without
   JavaScript.
 * Smooth scrolling with an admin toolbar offset and support for reduced-motion 
   preferences.
 * Custom titles and a maximum heading level for each block or shortcode.
 * Render-time heading anchors: saved post content is never changed.
 * Existing heading anchors are preserved; generated anchors are deterministic and
   repeated heading titles receive numbered suffixes.
 * Lightweight, dependency-free front-end JavaScript. No jQuery, accounts, tracking,
   external requests, or custom database tables.

Every feature is free. The plugin stores one settings option through the WordPress
options API.

#### Usage

Open Settings  TOCPilot to configure the defaults. Automatic insertion is enabled
for posts and pages, includes H2–H4, and requires at least three included headings
by default.

In the block editor, insert the Table of Contents block. Its sidebar lets you set
a title, maximum heading level, and collapsibility. The global heading range also
applies. The preview’s links and toggle are disabled while editing.

Use [tocpilot] for a manually placed table of contents. Optional attributes:

 * [tocpilot title=”On this page”] uses a custom title.
 * [tocpilot depth=”3″] includes headings up to H3 within the global heading range.
 * [tocpilot title=”Contents” depth=”4″] combines both options.

A block or shortcode needs only one included heading, regardless of the automatic
insertion threshold. With no included headings, it outputs nothing on the front 
end.

## Blocks

This plugin provides 1 block.

 *   Table of Contents A live table of contents built from your content headings.

## Installation

 1. Upload the tocpilot-table-of-contents folder to /wp-content/plugins/, or upload
    a ZIP containing that folder through Plugins  Add New  Upload Plugin.
 2. Activate TOCPilot — Table of Contents through the Plugins screen.
 3. Visit Settings  TOCPilot and select the post types and heading levels to process.
 4. View a post or page with at least three H2–H4 headings, or manually insert the 
    Table of Contents block or [tocpilot] shortcode.

## FAQ

### Does TOCPilot change my saved content?

No. Heading IDs and automatic tables of contents are added only when WordPress displays
the main content on a singular view of an enabled post type. No post content or 
post metadata is written. Deactivating the plugin removes its automatic output without
changing your posts.

### Where do automatic tables of contents appear?

On the main content of individual posts and pages by default. Select additional 
public post types in Settings  TOCPilot. Archives, feeds, and REST responses are
not processed by the content filter. Enable a post type there to receive heading
anchors, including when placing a block or shortcode manually.

### Can I turn off automatic insertion and keep the block or shortcode?

Yes. Turn off Auto-insert and leave the desired post types enabled. TOCPilot still
adds the heading IDs needed by your manually placed tables of contents.

### Why is there no table of contents?

Check the selected post type, heading range, and automatic minimum heading count.
Manual placement bypasses the minimum count but still requires at least one heading
within the selected range and any block or shortcode depth cap. Password-protected
content is not exposed before it is unlocked.

### Can I use the classic editor?

Yes. Automatic insertion and the shortcode read H1–H6 elements in classic content.
Gutenberg content is collected recursively from saved Heading blocks.

### What happens to custom anchors?

Existing nonempty heading ID attributes are left unchanged. Headings without an 
anchor get an ID based on their text. Repeated generated IDs receive suffixes such
as -2 and -3. Use distinct custom anchors when editing your headings.

### Can I have more than one table of contents?

Yes. Multiple blocks or shortcodes can use different titles or depth caps. Their
links use the same heading IDs and each collapse button controls its own list.

### Does the plugin contact external services?

No. It makes no external HTTP requests, sends no telemetry, and requires no account.
Assets are served from your own WordPress installation.

### What happens when I uninstall it?

Uninstalling deletes the tocpilot_settings option. Saved posts and pages are not
modified. Any blocks or shortcodes you placed yourself remain in the saved content
and can be removed in the editor.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“TOCPilot — Table of Contents” is open source software. The following people have
contributed to this plugin.

Contributors

 *   [ Ehtisham Ashraf ](https://profiles.wordpress.org/buildwithehtisham/)

[Translate “TOCPilot — Table of Contents” into your language.](https://translate.wordpress.org/projects/wp-plugins/tocpilot-table-of-contents)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/tocpilot-table-of-contents/),
check out the [SVN repository](https://plugins.svn.wordpress.org/tocpilot-table-of-contents/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/tocpilot-table-of-contents/)
by [RSS](https://plugins.trac.wordpress.org/log/tocpilot-table-of-contents/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0.0

 * Initial release with automatic insertion, a dynamic Gutenberg block, and the [
   tocpilot] shortcode.
 * Shared heading extraction, deterministic anchors, nested lists, and render-time
   ID injection.
 * Theme-inheriting styles, accessible collapse controls, smooth scrolling, and 
   complete settings.

## Meta

 *  Version **1.0.0**
 *  Last updated **7 hours ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 6.2 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.4 or higher **
 * Tags
 * [gutenberg](https://wordpress.org/plugins/tags/gutenberg/)[headings](https://wordpress.org/plugins/tags/headings/)
   [navigation](https://wordpress.org/plugins/tags/navigation/)[table of contents](https://wordpress.org/plugins/tags/table-of-contents/)
   [toc](https://wordpress.org/plugins/tags/toc/)
 *  [Advanced View](https://wordpress.org/plugins/tocpilot-table-of-contents/advanced/)

## Ratings

No reviews have been submitted yet.

[Your review](https://wordpress.org/support/plugin/tocpilot-table-of-contents/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/tocpilot-table-of-contents/reviews/)

## Contributors

 *   [ Ehtisham Ashraf ](https://profiles.wordpress.org/buildwithehtisham/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/tocpilot-table-of-contents/)