How To Create WordPress Table of Contents Without Plugin

Bloggers love to write long form content. Long content is good and always loaded with information. But, the only problem it faces is user readability. For avoiding this issue, we need to use a table of contents. Previously, I had written about WordPress Table of Contents with plugins. This time I will show how to create a WordPress Table of Contents without plugin.

Question: Does WordPress have its own Table of Contents block?

Answer

Nope, WordPress does not have its own default Table of Contents block baked into the Gutenberg Block Based editor yet. That is why you either need to create a WordPress Table of Contents manually or use a plugin.

Your readers find it very easy to jump to different sections within the article, by simply selecting from the table of contents section.

It is just very user-friendly making reading a great pleasure for your visitors.

In this post, we will be looking at an easy way to create WordPress Table of Contents manually.

Why Use Table of Contents In WordPress

The two most important reasons for using Table of Contents in WordPress are, user readability and SEO.

With user readability we are much more talking about how your website visitor can easily travel through the most interesting parts of your blog posts by simply clicking on the internal jump links within the table of contents.

It just makes it easier for the user, plus the page gets better user engagement.

When talking about SEO, Google automatically inserts jump links to sections, displaying it under regular search results in the SERP.

This applies to both, featured snippet and a regular search result.

wordpress table of contents - featured snippet
WordPress Table of Contents in Featured Snippet

Jump Links under regular search result.

wordpress table of contents without plugin
Jump Links

Doing this helps searchers easily get to point which they interested in, or are exactly looking for.

Create WordPress Table of Contents Without Plugin

For creating a WordPress Table of Contents without plugin, you should follow a few simple steps and you’re done.

I will be demonstrating on a regular WordPress Blog Post.

Step 1 – Create a List of all the Headings

Assuming, my Blog Post has the following headings (H2 and H3).

Note: You can also include H4.

  • Why Add Table of Contents in WordPress?
  • Create WordPress Table of Contents Using Plugin
    • Easy Table of Contents Plugin
    • Table of Contents Plus Plugin
    • Ultimate Addons For Gutenberg
  • FAQs
  • Conclusion

You will need to create a WordPress Nested List by simply clicking on the right indent element. This single nesting example is when you have H2 and H3.

If you have H4, select the Headings 4 and again click on right indent element.

wordpress nested list
Create A WordPress Nested List

Step 2: Apply HTML Anchor Tag For Each Heading

Beginning with your post’s first H2, apply HTML anchor tag to each of your headings.

Click on your H2, and then open the Advanced section of the Block Editor sidebar.

wordpress html anchor within blog post

Likewise, apply HTML anchors to all other headings, even H3.

Make sure, each of your HTML Anchors are unique. You will need to use them in the next step.

Step 3: Apply Internal Link To All Contents In Table of Contents

Now, use the same HTML Anchor and give internal link to all the contents, under the Table of Contents.

internally link all the contents under the table of contents
Internal Link All Contents of WordPress Table of Contents

For the Jump Links to work, you need to be careful of the following;

  1. Make sure to use the ‘#‘ symbol before copying the anchor text.
  2. The text used as anchor text under the Advanced section and the internal link should match
  3. Do not toggle ‘Open in new tab‘ switch

Step 4: Decorate Your Table of Contents (Optional)

If you would like to make your Table of Contents section stand out from the rest of the article, it is advised to apply a different background and another font style.

Click on the list and from the Block Editor sidebar, go to Color.

image

select color for table of contents

FAQs – WordPress Table of Contents Without Plugin

How do I manually create a Table of Contents in WordPress?

To manually create a table of contents in WordPress, create a list of your headings, apply HTML anchor to each heading. Use the same anchor text as internal link for each content, preceeded by ‘#’ symbol

How do you add Table of Contents to WordPress?

You can add table of contents to WordPress by simply downloading a dedicated table of contents plugin, by downloading a block based plugin that includes a table of contents block, or by creating it manually.

Conclusion

So, there you go. WordPress Table of Contents without plugin is as easy as downloading a plugin and using it.

The only down side of doing it manually is that, you have to keep track of all your HTML anchor texts and it can be really overwhelming with websites or blogs that are designed to continually grow with pumping content on a regular basis.

This is only good and wise to use if you only have a few articles and do not wish to download a WordPress Table of Contents plugin for your site.

I am in love with WordPress, building websites, doing SEO, and all that kind of stuff. I generally write about WordPress, Blogging, and SEO on BloggingIdol.

Leave a Comment