If you are confused about how to add table of contents in WordPress without using plugin then this guide will take you step by step to help you create one
Lets get started :
- Step 1: create a list block
- Step 2: Create subheading
- Step 3: Create an anchor link
- Step 4: Add table of contents
- Step 5: Add more to the table of Contents
Step 1: Create a list block.
To create a list block, click on the plus icon on the top left, and then select, ‘list.”
If you cannot find it then you can type ‘list’ in the search box that appear..
Step 2: Create subheadings
Then you need to create subheadings if you have not created them. To create sub heading block, click on the plus icon on the top left, then select “Heading”.
About headings- H1 is for title, H2 is for sub heading, H3 is sub heading under H2, and H4 is sub heading under H3. In this example ‘How to add table of contents in WordPress without using a plugin’ is the title i.e. H1. We are creating sub heading (H2).
After you select heading block, type your first sub heading.
For example, my sub heading is, ‘sub heading 1’
Then open the ‘Advanced’ drop down menu on the right.
Step 3: Create an anchor link
Anchor link allows us to link to another place on the same page.
After you open ‘Advanced’ menu, in the ‘HTML anchor’ box, type one or two words from your sub heading without using space.
For example, I typed, ‘subheading.”
Step 4 : Add table of contents
Return to the list block we created earlier (step 1) and type the first item on the list. You can keep it same as the sub heading or something similar.
For example, my sub heading is, ‘sub heading 1.” I will use the same one as the first item on my list.
Next, click on the ‘Link’ icon in the toolbar. A box appears, then type the symbol ‘#’ and the text from the ‘HTML anchor’ box in step 3.
Now, the item is linked to the sub heading.
Step 5: Add more items to the table of contents
To add more items to your table of content list, press enter at the end of first item and repeat the process from step 1
Table of content enables us to find the contents, and helps to improve user experience. This is all about how to add table of contents in WordPress without any plugin. Follow the instruction step by step.