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.
When visitors click on a link on your table of contents, they jump to that heading.
Let us begin.
Add A Table of Contents In WordPress Without A Plugin
Step One – Complete Your Blog Post
I recommend you write your blog post before adding your table of contents.
Here is a post on another website I own. I want to put a table of contents above the first sub-heading.
Step Two – Create A Heading Block
Create a header block on your blog post. I use the ‘/’ shortcut. WordPress offers a menu of available blocks when you type ‘/’ and the letters of the block you need.
Change the header level and type Table Of Contents.
Step Three – Create A List Block
Next, create a list block.
Now you can start adding links to post sub-headings.
Step Four – Type Your First Sub-Heading
The ‘List’ block has links to your sub-headings in your post. Write your sub-headings into your list block first.
The top heading for this post is ‘When is Chateau De Loei open?‘.
Step Five – Create A Destination Anchor
We want the table of contents to link to all sub-headings. To create a destination anchor, click on the sub-heading and open the advanced tab on the right.
Step Six – Add Text To HTML Anchor Data Field
Write one or two words in the ‘HTML Anchor’ data field. Ensure you use a ‘-‘ between words.
For my destination anchor, I used chateau-open.
Step Seven – Add Links To Your Table Of Contents
Copy the text in the HTML anchor data field and return to your table of contents.
Highlight the sub-heading in your list block and select the link icon.
In the link box, type ‘#’ followed by the text in the HTML anchor data field. Type ‘#’ first, or your link won’t work.
To create a link, select the submit icon.
Now you have a clickable link from your table of contents to your first header. The text in the table of contents changes color to show it is now a link.
Step Eight – Complete Table Of Contents
Complete your table of contents by adding your sub-headings to the list block.
Add text to the HTML anchor field.
Then copy the text from the HTML anchor data field. Highlight the heading in your table of contents.
Click on the link icon, and type ‘#’ followed by the text you copied from the HTML anchor field.
Select submit to create the clickable link.
The heading text changes color to show it is now a clickable link.
Continue this process until you have your sub-headings in your table of contents.
Step Nine – Publish And Test
I recommend you test your table of contents links to ensure they work. You could make mistakes when creating a table of contents without a plugin.
Test your links before your visitors read your post. You don’t want your visitors to have a poor user experience with broken links.
Add A Table Of Contents In WordPress Without A Plugin Video Tutorial
You do not need a plugin to create a table of contents for your blog.
Complete your blog post and create a table of contents using a list block.
Type your sub-heading into your list. Next, click on your post’s sub-headings and add text to the HTML anchor data field under the advanced tab on the right.
To make clickable links, return to your list block and highlight each sub-heading. From the toolbar, select the link icon. Type ‘#’ followed by the HTML anchor text, then click Submit.
Once completed, I recommend publishing your posts and checking your links. It is easy to make a mistake. You want to find broken links before your visitors.
I created a table of contents without a plugin when I started blogging. Now I use the Kadence table of contents block. Check out my ‘Easy Way To Create A Table Of Contents‘ post to learn more.
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.
For WordPress tutorial videos, please check out my YouTube channel. I look forward to seeing you again soon.