It is possible to add a table of contents in WordPress without using a plugin or embedding HTML code. I show you how to create a table of contents like this.
You can add a table of contents to your blog posts with just a few clicks.
Let me show you how.
- Create a list block in your WordPress editor
- Type your first post heading
- Create an anchor link
- Add a table of contents to your post
- How to add another item to your list
- How to add a table of contents video tutorial
- Frequently asked questions
Create a list block in your WordPress editor
To start your table of contents, create a ‘list block’. To start a block, select the plus icon on the top-left and search for ‘List’.
Select the ‘List’ block, then you get this.
This is going to be your table of contents. Here will be your post headings.
Let’s create a heading.
Type your first post heading
Next, we create our first post heading. To create a heading block, click on the plus icon on the top left. Then search for ‘Heading’, like this.
Now you have a block to type your heading. The default heading is H2, this is for your top-level headings. If you need to create a sub-heading, you can change this to H3 or H4.
To clarify headings, H1 is your blog title, H2 are the headings in your post. H3 would be a sub-heading under an H2 heading with H4 headings under H3 sub-headings.
Now we type our first heading. For example, I am going to use my first heading from this post.
Now we have our first heading, it is time to create a link. To do that, click on the heading block and then select the ‘Advanced’ drop-down menu on the right.
This is where we create an anchor link. An anchor link allows us to have a link that goes to another place on the same page.
Create an anchor link
In the ‘HTML anchor’ box, type one or two keywords, that fit your heading text. I am going to type ‘listblock’ into the box in this tutorial.
Add a table of contents to your post
Now we have our heading and HTML anchor. Next, we can add a table of contents to our post. Go to your list block and type in or copy and paste the text from your first heading.
My first heading was ‘Create a list block in your WordPress editor’, so I am going to type that as the first item on my table of contents.
Next, click on the ‘Link’ icon in the toolbar. In the box that appears, type the symbol ‘#’ and then the text from your ‘HTML anchor’. Finally, select the ‘Apply’ icon.
Now you have created a link from your table of contents to your first heading. You continue adding headings to your list block. Therefore, when a visitor comes to read your post, they can jump to the section they want to read.
How to add another item to your list
When you are ready to add another item to your list, just go to the end of the first heading in your table and hit enter. The cursor will drop to the next line, you now have a place for your next heading. Follow the steps I showed you above and continue like this until you have completed your post.
This is the process I went through on this post to create the table of contents you see at the start of this post.
How to add a table of contents video tutorial
Frequently asked questions
There are free plugins that can help you create this feature for your website. I recommend not using a plugin, too many plugins on your WordPress site results in slower loading speeds. I show you in my post, how you can create a table of contents without a plugin step by step.
I use list blocks and anchor links to create a table of contents on all my posts and pages. In my post, I take you step by step how to do this without using a plugin.
Creating anchor links in your posts and pages allows your visitors to jump to another section on the same page. In my post, I show you how to add anchor links to a table of contents. These links add a feature to your post so that visitors can jump to the section they want to read.
When your visitors are looking for information, they want to get to what they want quickly. Adding a table of contents to your posts, helps your visitors find what they are looking for quicker.
I add them to all my posts now. They are easy to add, you do not need to use a plugin or have to know any code.
If you are doing this for the first time, I recommend you test your links after you have published your post. I missed adding HTML anchor text to my links a couple of times.
Do you add a table of contents to your blog posts?
Did you know you could create a list like this without a plugin or code?
What problems are you having in WordPress? Let me know in the comments below if I can help you, I will write a blog post about it.
I look forward to reading your comments.