How to Create a Table of Contents in WordPress (Easy Ways)

Have you ever stopped reading a post because it was too long or couldn’t find the section you wanted to read? This could be solved if the author had created a table of contents.

Including a table of contents in your site’s posts allows you to assess the structure of large posts and helps with SEO. This functionality will improve the user experience by allowing readers to jump to relevant sections of your post without scrolling.

In this post, we will show you two ways to create a table of contents for a WordPress site, using a plugin or without a plugin. We also show the best table of contents WordPress plugins for your reference.

Why Should You Include a Table of Contents in Your WordPress Posts?

A table of contents (TOC) allows readers to quickly jump to relevant sections of a WordPress post, which can increase readability – especially for long-form content.

Including a table of contents improves search engine optimization as well. It may, for example, reduce your website’s bounce rate by allowing users to quickly navigate to the sections that answer to their search intent.

Additionally, TOCs might help in making your web pages appear more attractive on search engine results pages (SERPs). Including a table of contents allows Google to automatically generate jump links to different sections of your post.

Adding a Table of Contents in WordPress Without Plugin

WordPress has added a new HTML anchor option that allows you to add anchor links in WordPress. Using this option, you can quickly create a table of contents without using a plugin.

Let’s see how it works.

At first, we will be adding HTML anchors to the headings. Select a heading and then click on the Advanced tab from the right-hand side options. Then, in the HTML anchor box, type the anchor text.

Adding Anchor Tag to the Heading

Do the same thing with the other headings.

Now let’s create a list of contents. You can use the List block to make a list.

Create a List in WordPress Editor

Once your list of contents is ready, you can add anchor links. Select a text and link it with a # right before the anchor text.

Adding Anchor Tag to a List

Do the same thing for other lists, and your table of contents is ready.

Although this is a simple process, it does require some HTML and CSS knowledge. If you’re not comfortable with coding, you may add a table of contents to your WordPress posts and pages using a plugin.

Adding a Table of Contents in WordPress Using Plugin

Manually creating a table of contents may be time-consuming for large posts with various headings. Fortunately, a WordPress plugin can help you with this.

For this post, we will use the Easy Table of Contents WordPress plugin to create a TOC in WordPress.

First, install and activate the Easy Table of Contents plugin. For more in detail, see our guide on how to install a plugin in WordPress.

After activation, navigate to the Settings » Table of Contents page. From here, you can manage general settings for the table of contents like selecting a position, choosing a label for the container, etc.

Table of Contents Settings

You can also enable or disable the table of contents auto-insertion for each post type. If you enable the plugin, it will add a table of contents to any article with more than four headings. You can adjust that number to whatever you like.

After that, you can change the appearance of the table of contents box by scrolling down. From here, you may choose a theme, change the width and height, change the font size, or create a customized color palette for your table of contents box.

Table of Contents Appearance

Then navigate to the advanced settings section. The default settings are enough for most sites, but you can review them to check if anything needs to be changed.

Advanced Settings of Table of Contents

Lastly, click on the Save Changes button to save these settings.

5 Best Table of Contents WordPress Plugins

Below are the best TOC WordPress plugins you can use to add tables of contents to your WordPress site.

1. Easy Table of Contents

Easy Table of Contents WordPress Plugin

Easy Table of Contents is a popular WordPress TOC plugin. It allows users to quickly create a table of contents without having to edit any HTML code. All you have to do is configure the plugin’s settings as described above, and the TOC will appear automatically on your post.

This plugin has no premium version. Hence all of its features and functions are available for free.

Pros of Easy Table of Contents:

  • It generates a table of contents automatically based on the page’s headings.
  • You can easily enable and disable the TOC for certain pages and posts.
  • It allows you to nest headings to make a list easier to navigate through.
  • It works with Gutenberg, WordPress’ native block editor.
  • The backend provides extensive color, width, and text size customization options.

Cons of Easy Table of Contents:

  • Some users have complained that the plugin is bloated with unnecessary code, which may cause your site to slow down.
  • You cannot manually insert the TOC into different sections of the website.

2. LuckyWP Table of Contents

LuckyWP Table of Contents WordPress Plugin

LuckyWP Table of Contents is a free TOC WordPress plugin that allows you to create a table of contents using Gutenberg blocks, sidebar widgets, or manual inserts (with a shortcode).

Furthermore, LuckyWP is also compatible with various WordPress page builder plugins. Users can change the width, hover colors, and font sizes of their TOCs to make them look better. It even provides a floating TOC option.

This plugin offers SEO-friendly features and a nice user experience, and all of the tools are free.

Pros of LuckyWP Table of Contents:

  • It’s highly customizable.
  • The ToC includes a “show/hide” option for a better user experience.
  • It works with Gutenberg, WordPress’ native block editor.
  • You can specify a minimum number of headings to display in the TOC. If a page does not match these criteria, it will not display a ToC.
  • You can customize the labels for each section to make scanning easier.

Cons of LuckyWP Table of Contents:

  • It only works with a few page builders, including Gutenberg, Elementor, Beaver Builder, and WPBakery.
  • If you turn on the “auto-insert” option, a table of contents will appear on every page, which may look odd depending on the page (e.g., a product page).

3. Table of Contents Plus

Table of Contents Plus WordPress Plugin

Table of Contents Plus is one of the widely used tables of contents plugins, with over 300,000 active installations.

This plugin makes it simple to create a content-specific index or TOC for long pages and custom posts. You may then put these indexes in the sidebar, making your website look like Wikipedia.

This is ideal for content-rich websites and is compatible with content management systems that organize dense information.

Pros of Table of Contents Plus:

  • You can change the table of contents’ position and define the minimum number of headings.
  • You can use shortcodes to hide the table of contents or exclude specific sections for a cleaner look.

Cons of Table of Contents Plus:

  • Auto insertion only works on CPT when the shortcode is already used on the custom post type.

4. Ultimate Blocks

Ultimate Blocks – Gutenberg Blocks Plugin

Ultimate Block is a multipurpose plugin that provides 47 different sorts of blocks for the WordPress Gutenberg editor, along with the table of contents block. All of the blocks are free and work with WordPress versions 5.0 and higher.

If you have extensive website posts with various content types, this plugin is a good choice. For example, it’s ideal for bloggers or marketers who want to include a call to action and testimonial blocks in addition to a table of contents block.

Pros of Ultimate Blocks:

  • It creates a table of contents based on the page’s headings.
  • Users can select whether to display or hide the TOC.
  • You may place a ToC anywhere on a page or post by simply inserting the block.
  • You can divide the list items into two and three columns for a better user experience.

Cons of Ultimate Blocks:

  • It does not work with third-party page builders.
  • It has a limited number of customization options.

5. Heroic Table of Contents

Heroic Table of Contents plugin

Heroic Table of Contents is a free ToC WordPress plugin that allows you to add an automatically created table of contents to your site.

This plugin reads your articles and creates a table of contents with the headings (h1, h2, h3, etc.). You can quickly hide any heading classes that you don’t want. This means you won’t have to manually generate your ToC or update it whenever you edit an article.

Furthermore, because it is built as a WordPress block, it is simple to drag and drop a Heroic ToC into your content.

Pros of Heroic Table of Contents:

  • It creates a table of contents based on the page’s headings.
  • You can relabel headings to make them shorter and easier to scan.
  • It allows you to pick between a numbered, bulleted, or plain list.
  • It’s Gutenberg-optimized for easy use within WordPress’ native block editor.

Cons of Heroic Table of Contents:

  • It only comes with 4 TOC styles.
  • It has a limited number of customization options.

Conclusion

Adding a table of contents to a WordPress website is a great tactic to reduce bounce rate and boost overall SEO.

Fortunately, including one in your WordPress posts is a simple process. As we discussed in this post, users can create a TOC manually or with the help of a plugin.

We also show some of the top table of contents WordPress plugins to get you started. If you’re new to WordPress, we recommend the Easy Table of Contents plugin because it’s free and simple to use.

We hope this post helps you learn how to create a table of contents in WordPress posts and pages. If you like this post, then read more posts like this on our website.