WordPress GuideBuild → Add Table of Contents

How to add a table of contents in WordPress

A young woman sits and gazes over her laptop computer as she researches managed WordPress hosting

Add structure, improve readability, and boost SEO with a simple feature: a table of contents. Whether you’re publishing long-form blog posts or documentation-style content, it helps users quickly find the sections they care about most.

Get fast, reliable hosting for WordPress

Power your site with the industry’s fastest, most optimized WordPress hosting

Why add a table of contents in WordPress?

A table of contents (TOC) can dramatically improve how visitors interact with your site. It lets them scan your article at a glance and jump directly to the information they need.

On top of that, search engines use tables of contents to better understand your content’s structure. TOCs can even trigger rich snippets in Google search, increasing your post’s visibility and click-through rate.

Method 1: Use a table of contents plugin

The easiest and most flexible way to add a TOC in WordPress is with a plugin. You’ll get automatic section detection, customization options, and placement controls without writing code.

Recommended plugins for table of contents

Here are a few solid options, depending on your needs and preferred editor:

How to install and set up a TOC plugin

Some plugins add a block or shortcode for manual placement if you don’t want it to appear on every post automatically.

Method 2: Use a Gutenberg block (native or plugin)

If you’re using the block editor, some TOC plugins add a dedicated block you can drop anywhere in your post.

Using SimpleTOC or Kadence Blocks

This method works great if you want to visually design your content and TOC layout together.

Using anchor links manually

You can also build your own table of contents with HTML anchor links—no plugin required.

For smoother user experience, you can enable smooth scrolling with a small snippet of CSS or use a plugin like Page scroll to id.

Method 3: Use a page builder (Elementor, Divi, etc.)

If you’re building pages with Elementor or Divi, TOC functionality might already be baked into your workflow.

Elementor

Divi

Divi doesn’t offer a built-in TOC module, but you can:

How to customize your table of contents

Most TOC plugins offer plenty of styling and behavior settings:

If your theme clashes with the TOC styles, you can override them with custom CSS.

Common problems and how to fix them

Even reliable TOC plugins can occasionally misbehave. Here’s how to troubleshoot:

SEO tips for using tables of contents

A good TOC doesn’t just help readers—it can help your rankings too.

Best practices for using a TOC

Keep these guidelines in mind to make the most of your table of contents:

Additional resources

How to build a WordPress site →

A complete beginner’s guide that covers 9 key steps to a successful launch

How to insert a background image in WordPress (only one page) →

Learn how to add a background image to a single page in WordPress with simple steps and customization tips.





How to use WordPress Gutenberg blocks →

A complete beginner’s guide to Gutenberg blocks