In my post, I show you how to create a table of contents in WordPress without a plugin, step by step.
A table of contents helps your visitor find the information they need quickly. The internal links jump to the part of your post your visitor wants to read.
Here is an example of a table of contents on my website. It is simple to create. You don’t need a plugin or have to input any code. Each step is a link to a heading on the same page.
Let’s get started.
Table of contents
- Create a list block in your blog post
- Write a sub-heading
- Create an anchor link
- Add links to your list block
- Add more items to your table of contents
- How to add a table of contents video tutorial
Step 1 – Create a list block in your blog post.
First, on your blog post, click on the plus icon to create a new block.
Type ‘List’ in the search box, then select the ‘List’ icon.
The list block is your table of contents. You have the option of showing dots or numbers on the left.
Step 2 – Write a sub-heading.
The ‘List’ block has links to your sub-headings within your post. Therefore, you need to write your sub-headings first.
To create a sub-heading, click on the plus icon. Type ‘Heading’ in the search box, then select the ‘Heading’.
The default heading is H2. Your blog post title is H1.
Next, write your first sub-heading.
Step 3 – Create an anchor link.
The first sub-heading is going to be a link destination, the anchor. Next, on the right of the editor, open the ‘Advanced’ tab.
In the ‘HTML anchor’ box, type one or two words without spaces relevant to the heading.
The HTML anchor is the destination for your link, the anchor.
Step 4 – Add links to your list block.
Next, start creating your table of contents. Go to your list block and type the text for the first sub-heading.
Now, highlight the text in your list block to make the toolbar appear. Then, select the ‘Link’ icon.
In the search box, type a ‘#’ followed by the text in the ‘Advanced HTML anchor’ box from step 3.
Don’t forget to add the ‘#’ before your text. The hashtag tells WordPress this is an anchor link on the same page. Finally, select the ‘Submit’ icon to make your link live.
After you select ‘Submit,’ your text will change colour to indicate it is now a link.
Now the items in your list block link to your headings. When your visitor visits your post, they can click on any item in your table of contents and skip directly to that part of your blog post.
Step 5 – Add more items to your table of contents.
Continue adding text to your table of contents and create links to your post headings following the steps in this tutorial.
Don’t forget the hashtag when creating links and ensure the text is an exact match to the text in the ‘HTML anchor’ box. If you do not have the hashtag or the text is different, the link won’t work.
I recommend after you publish your post. Open your blog post and test the links are working.
How to add a table of contents video tutorial
Now, you can add a table of contents to your blog posts without a plugin. The process takes just a few moments.
I add a table of contents to all my blog posts to help visitors find information quickly. You must create the best possible experience for your visitors.
Before you return to your blog to add a table of content to your posts, may I ask for one minute of your time to leave a comment? I love reading comments from visitors to my site. I appreciate any feedback you have about my content.
If you enjoy learning WordPress through video, then please check out my YouTube channel. I look forward to seeing you again soon.