How to add a table of contents in WordPress
Blog,  Wordpress

How to add a table of contents in WordPress without a plugin

In my post, I show you how to create a table of contents in WordPress without using a plugin.

When I started using WordPress, it felt like there was so much to learn, but once you use it for a while, it gets easier.

My guide takes you step by step, in just a few minutes, you will have a table of contents for your blog.

This is a table of contents from a post on my WordPress site. You can have this with a few clicks.

Table of contents in WordPress

Let’s get started.

First, create a list block

To create a list block, select the plus icon on the top-left and search for ‘List’.

Create a list block in your WordPress editor

Select the ‘List’ block icon. Now you have a list block in your post. This is where your table of contents will be.

A list block in WordPress

We want to link to sub-headings within the post content, we don’t have any yet, so the next step is to create a sub-heading.

Second, create a sub-heading

To create a sub-heading block, click on the plus icon on the top-left. Then search for ‘Heading’, like this.

Create a heading block in WordPress

Now you have a block to type your heading. The default heading is H2, this is for your top-level sub-headings.

Select your heading tag

To clarify headings, H1 is your blog title, H2 are the sub-headings in your post. H3 would be a sub-heading under H2, and H4 sub-headings sit under H3.

Type your first sub-heading into this block. For example, my sub-heading is ‘Create a list block in your WordPress editor’.

Type your heading

Now we have a sub-heading we can link to from our table of contents. To create a destination link, open the ‘Advanced’ drop-down menu on the right.

Select the advanced drop-down menu option on the right

We are going to create an anchor link. An anchor link allows us to link to another place on the same page.


Advertisement

Free WhoisGuard with Every Domain Purchase at Namecheap

Third, create an anchor link

In the ‘HTML anchor’ box, type one or two words from your sub-heading. For example, I typed ‘listblock’.

Type your text in to the HTML anchor box

Fourth, add a table of contents

Now, we have a heading in our post that we can link to. Next, return to the list block created earlier and type the first item on the list. This could be the same as the sub-heading or something similar.

My first heading was ‘Create a list block in your WordPress editor’, I typed that as the first item on my table of contents.

How to add a table of content in WordPress

Next, click on the ‘Link’ icon in the toolbar. In the box that appears, type the symbol ‘#’ and then the text from the ‘HTML anchor’ box. Finally, select the ‘Apply’ icon. Like this.

How to add a table of content in WordPress

Now, the list item is linked to the sub-heading. Therefore, when a visitor comes to the post, they can jump to the section they want to read using links in the table of contents.

Table of content link to your headings

Finally, add more to the table of contents

To add another item to your content list, press enter at the end of the first item and go through the same process. Create your sub-headings in your content, give them anchor links, finally, add the link destination to your table of contents.

How to add another item to your table of content

How to add a table of contents video tutorial

Frequently asked questions

How do I add a table of contents in WordPress?

You can create a table of contents in WordPress by using anchor links. Anchor links allow you to jump to another place on the same page.

How do I add a table of contents to WordPress posts and pages?

Use list blocks and anchor links to add a table of contents to your WordPress posts and pages.

How do I link to a section on the same page in WordPress?

Anchor links allow you to jump to another place on the same page.

Conclusion

Now you know how to add a table of contents in WordPress without a plugin or using any code.

Follow my step by step guide to add a table of contents to all your posts, it helps your visitors find the content they need quicker. It is about the user experience, the easier you make it for your visitor to interact with your blog, the more engaged they will be.

Before you go to add a table of content to your first post, may I ask a small favor? Please leave a comment letting me know if my blog post helped you. I really appreciate it.

If you enjoy learning WordPress through video, then please check out my YouTube channel. I post at least one video per week, sometimes more. I also have more WordPress tutorials on this website.

Sharing is caring!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.