A table of contents makes it easier for visitors to navigate your content, improving readability and SEO. Whether you’re running a blog, an educational site, or an e-commerce platform, adding a TOC to your WordPress posts or pages can significantly enhance user experience.
In this guide, we’ll walk you through different methods to create a table of contents in WordPress.
Read More: How to Style Heading Tags in Blog Posts
Why Use a Table of Contents?
1. Improves Readability
A TOC breaks down long articles into sections, making it easier for users to scan and find relevant information quickly.
2. Enhances SEO
Search engines like Google prefer well-structured content. A TOC helps improve search rankings by enabling rich snippets and internal linking.
3. Boosts User Engagement
Readers can jump directly to the section they’re interested in, increasing the chances of them staying longer on your site.
Methods to Create a Table of Contents in WordPress
Method 1: Using a WordPress Plugin
The easiest way to add a TOC in WordPress is by using a plugin. Here are some of the best options:
1. Easy Table of Contents

- Go to Plugins > Add New in your WordPress dashboard.
- Search for “Easy Table of Contents.”
- Install and activate the plugin.
- Navigate to Settings > Table of Contents and configure the options.
- The plugin automatically adds a TOC to your posts based on headings (H2, H3, etc.).
2. LuckyWP Table of Contents

- Install and activate the plugin following the same steps as above.
- Go to Settings > Table of Contents to customize styles and appearance.
- Manually insert the TOC using a shortcode
[lwptoc]
where you want it to appear.
Method 2: Manually Creating a Table of Contents
If you prefer not to use a plugin, you can manually create a TOC using anchor links:
Step 1: Add Anchor Links to Headings
- Edit your post in the WordPress block editor.
- Select a heading, click on the Advanced tab, and add an HTML anchor (e.g.,
section1
).
Step 2: Create a Table of Contents
- At the top of your post, create a bulleted list and add links to each section manually:
<ul>
<li><a href="#section1">Introduction</a></li>
<li><a href="#section2">Why Use a TOC?</a></li>
<li><a href="#section3">Methods to Create a TOC</a></li>
</ul>
- Each link should match the anchor added in Step 1.
Method 3: Using the Block Editor (Gutenberg)

The WordPress block editor offers an easy way to insert a TOC using a heading block and anchor links.
Steps to Add a TOC Using Gutenberg
- Insert a List Block at the beginning of your post.
- Manually add links to different sections using anchor links.
- Use the HTML Anchor feature in the Advanced Settings of each heading to connect sections.
Final Thoughts
Adding a table of contents to your WordPress website enhances user experience and boosts SEO. Whether you choose a plugin, manual method, or Gutenberg blocks, having a structured TOC ensures readers can navigate your content effortlessly. Try implementing one of these methods today and make your posts more engaging!
Do you use a TOC on your website? Let us know in the comments below!