How to Create a Table of Contents in WordPress

A table of contents (TOC) is an organized list of headings, subheadings, and sections usually covered at the beginning of any blog post. It is a navigational guide outlining the main points so users can quickly understand the topics discussed in the post/content.

All the points in TOC are presented in clickable HTML anchor texts. So, users can instantly jump to the particular points of the content by clicking them. In this post, we’ll show you how to create a table of contents in WordPress.

Step 01: Install the Ultimate Blocks Plugin

Ultimate Blocks is a block plugin. It includes 25+ custom Gutenberg blocks to help with content creation. Table of Contents is one of them. Install and activate the plugin on your site.

Install and activate the Ultimate Blocks plugin

Step 02: Organize Your Content with Proper Heading Tags

WordPress allows you to add up to six heading tags (from H1 to h6) to your content. It is impossible to create a table of contents without the proper placement of heading tags.

H1 is always reserved for post titles. So, you can use heading tags from h2 to h6 in the posts according to their demand. See the image below – we have created a structure with them.

Content organized with proper headings

Step 03: Add the Table of Contents Block

Hover your cursor to the point where you want to create the table of contents. Press the plus (+) button. Type Table of Contents in the search box. Add it to the editor.

Add the Table of Contents block

You can see the Table of Contents block is created. Don’t forget to give it a title at the top.

The table of content block is created

Step 04: Customize Settings of the Table of Contents Block

The Table of Contents block allows you to customize numerous settings. Open the Settings tab on the right sidebar. Tick the headings you want to display. Next, select a layout type for the block you like.

Customize headings and layout of the Table of Contents block

Scroll the Settings tab a bit more. You can do the following things with the options on the tab.

  • Collapsible – Hides the entire block and opens it by clicking.
  • Scroll – Enable smooth scrolling and reference them to ids, classes, and elements.
  • Additional – Romanize the anchor text and remove diacritics from anchor links.
  • Responsive Control – Allows to display/hide the block on specific device types (mobile, tablet, and desktop)

The Pro option is reserved only for premium users. Once you upgrade to the premium version, you can add icons to the block and make it sticky while scrolling the content.

Further customize settings of the Table of Contents block

Thus, you can create the Table of Contents for your blog posts with the Ultimate Blocks plugin.


Add a table of contents is mandatory when you cover long blog posts and articles. Because it allows users to find the content they are actually looking for quickly. It not only upholds user experience but also saves time.

Ultimate Blocks have numerous other blocks by which you can make your content more compelling and reading-worthy. Take a look at what you can do with the Ultimate Blocks plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *

Early Bird Offer Is Live Now!
This is default text for notification bar