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.
Let’s get started.
- First, create a list block
- Second, create a sub-heading
- Third, create an anchor link
- Fourth, add a table of contents
- Finally, add more to the table of contents
- How to add a table of contents video tutorial
- Frequently asked questions
First, create a list block
To create a list block, select the plus icon on the top-left and search for ‘List’.
Select the ‘List’ block icon. Now you have a list block in your post. This is where your table of contents will be.
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.
Now you have a block to type your heading. The default heading is H2, this is for your top-level sub-headings.
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’.
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.
We are going to create an anchor link. An anchor link allows us to link to another place on the same page.
Third, create an anchor link
In the ‘HTML anchor’ box, type one or two words from your sub-heading. For example, I typed ‘listblock’.
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.
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.
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.
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 a table of contents video tutorial
Frequently asked questions
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.
Use list blocks and anchor links to add a table of contents to your WordPress posts and pages.
Anchor links allow you to jump to another place on the same page.
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.