◦ Comprehensive security
◦ 24/7 support
WordPress Guide → Build → Add Table of Contents
How to add a table of contents in WordPress
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:
- Easy Table of Contents: Works with classic editor, Gutenberg, and most themes. Supports auto-insertion, heading level selection, collapsible toggles, and styling.
- LuckyWP Table of Contents: Lightweight and SEO-friendly, with block support and a widget. Great for precise control over headings and appearance.
- SimpleTOC: Designed specifically for the Gutenberg block editor. Adds a no-frills TOC block that’s easy to use and style.
- Bonus: Some premium page builders and plugins like Thrive Architect or Kadence Blocks also include built-in TOC blocks.
How to install and set up a TOC plugin
- From your WordPress dashboard, go to Plugins > Add New.
- Search for your chosen plugin (e.g., “Easy Table of Contents”).
- Click Install Now, then Activate.
- Navigate to Settings > Table of Contents to configure defaults.
- Choose:
- Which post types should display a TOC.
- What heading levels to include (e.g., H2–H4).
- Whether to auto-insert TOCs or use shortcodes.
- Style, width, and position.
- Which post types should display a TOC.
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
- In the WordPress editor, click the + button to add a new block.
- Search for “Table of Contents.”
- Choose the TOC block from your installed plugin (e.g., SimpleTOC).
- The block automatically scans your content and displays a list of headings.
- Customize appearance, heading levels, and collapsibility in the block settings panel.
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.
- Click on each heading in your post, go to Advanced > HTML Anchor, and add a unique ID (e.g., features, setup, faq).
- At the top of your post, manually type a list of links:
[Features](#features)
[Setup](#setup)
[FAQs](#faq) - Save and preview your post. Clicking those links will jump to the associated sections.
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
- Edit your post or page with Elementor.
- Drag the Table of Contents widget (available in Elementor Pro) into your layout.
- Select which headings to include (H1–H6) and customize fonts, colors, and spacing.
- The widget auto-generates links to each section and supports collapsible toggles.
Divi
Divi doesn’t offer a built-in TOC module, but you can:
- Use a shortcode from a plugin like LuckyWP or Easy TOC.
- Manually create anchor links in your layout as described above.
How to customize your table of contents
Most TOC plugins offer plenty of styling and behavior settings:
- Styling: Customize background, border, font size, indentation, and bullet styles.
- Placement: Choose top of post, before first heading, or manual block/shortcode.
- Headings: Select which heading levels to include, and in what order.
- Visibility: Enable toggle (expand/collapse) options.
- Behavior: Add smooth scrolling, or hide TOC on shorter posts.
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:
- TOC not showing up: Check if your content has proper headings (<h2>, <h3>, etc.). Plain text or bolded text won’t work.
- Wrong or missing links: Make sure no headings are duplicated or missing IDs.
- Weird styling: Some themes may override TOC styles. Use plugin settings or additional CSS to adjust.
- TOC showing up in weird places: Adjust placement settings or switch to manual shortcode insertion.
SEO tips for using tables of contents
A good TOC doesn’t just help readers—it can help your rankings too.
- Use clear heading structure (<h2> for main sections, <h3> for subtopics).
- If you use named anchors (#feature-overview), Google may create sitelinks for your post.
- Avoid keyword stuffing or repeating identical headings—it can confuse crawlers.
Best practices for using a TOC
Keep these guidelines in mind to make the most of your table of contents:
- Only add TOCs to long or multi-section content (800+ words is a good baseline).
- Place the TOC near the beginning of the post—above the first H2 is ideal.
- Keep it concise. Avoid listing every subheading unless it adds value.
- Use collapsible TOCs to reduce clutter, especially on mobile devices.
Next steps for adding a table of contents in WordPress
Adding a table of contents makes your content easier to read, easier to rank, and easier to trust. It’s a small feature that delivers big benefits.
Choose the method that matches your workflow—plugins, block editor, or page builder—and start adding TOCs to your best content.
Ready to upgrade your WordPress experience? Professional hosting improves speeds, security, and reliability for a website and a brand that people find engaging and trustworthy.
Don’t want to deal with server management and maintenance? Our fully managed hosting for WordPress is the best in the industry. Our team are not only server IT experts, but WordPress hosting experts as well. Your server couldn’t be in better hands.
Click through below to explore all of our hosting for WordPress options, or chat with a WordPress expert right now to get answers and advice.
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