When you are writing a long post then adding the table of content is really necessary, because when the article has so many side headings and so many paragraphs then the visitor gets confused in finding their required information and leave the site. So in this case adding the table of contents makes the reader to find his required information easily.
You can add the table of contents easily by using plugins like Easy table of contents. But adding plugins for everything is not a good idea when you have an alternative.
Here we will see how to add a table of contents easily in your WordPress post by using jump links without using any plugin. It doesn’t require a lot of technical knowledge, it is very easy, let’s see how to do it.
For example, if you want to add a table of contents like this:
In order to create a table of contents, first, you need to write anchor texts for each of your heading tags on which the visitor clicks, later we convert them into links. You can use the same anchor texts as in heading tags or you can use a different one. But make it simple and easy to read.
How to Add Table of Contents in WordPress Without Plugin
Step 1: Convert text into a hyperlink
In first we need to convert the anchor text into a hyperlink. Here we can call it as anchor link id.
And before the text add #. You can find it in the below image.
Step 2: Add Anchor Link Id to the heading tag
Now Add anchor link ID to the heading tags. Here Id means the hyperlink which we have created in the above step. To add the id to the heading tag, select the heading tag and switch to the text version of your WordPress post and add anchor link id. You can see it in the below image. Remember here we don’t add # symbol.
(You just need to add id=”anchor link” in the heading tag)
You need to do it for all your h2, h3, and h4 tags, Later you can style the anchor text into bullet points.