How to Create a Table of Contents in WordPress Posts and Pages

How to Create a Table of Content in WordPress Posts and PagesDid you ever want to add a Wikipedia like table of contents box on some of your long articles? A table of contents makes it easier for users to jump to the section they would like to read. In this blog post, we are going to show you the best way to create a table of contents in WordPress posts and pages without the need of writing any HTML or CSS.

Why Add a Table of Contents in WordPress Posts and Pages?

You might have seen the table of contents on websites like Wikipedia. A table of contents makes it easier for users to jump to the section they would like to read in long articles.

It also helps with your WordPress SEO because Google automatically adds a jump to section link next to your website in search results.

You’ll be able to manually create a table of contents in WordPress by writing HTML code. However which is difficult for beginners because you will have to manually create a list, add links, and add ID attribute through-out the article.

However there’s an simple and easy way. Let us have a look about how to easily create a table of contents in WordPress posts and pages.

Creating a Table of Contents in WordPress

First thing you should do is to install and activate the Easy Table of Contents plugin. For more details, see our detailed guide regarding how to install a WordPress plugin.

Upon activation, you have to visit Settings » Table of Contents page. From here, you will be able to manage general settings for the table of contents like selecting position, choosing a label for the container, etc.

How to add a Table of Contents in WordPress Posts and Pages

You will be able to also enable or disable auto-insertion of the table of contents for each and every post type. If enabled, then the plugin will automatically add a table of contents for any article that has more than 4 headings. You will be able to change/modify that to any other number which you like.

Generally, we do not recommend adding a table of contents on every article unless all of your articles are really long.

Next, you will be able to scroll down to modify the appearance of the table of contents box. From here you will be able to pick a theme, adjust width and height, set the font size, or create a custom color scheme for your table of contents box.How to add a Table of Contents in WordPress Posts

After that, you have to go to the Advanced settings section. The default options would work for the majority of websites, however you will be able to review these options to view in case you would like to adjust anything.

How to add a Table of Contents in WordPress PagesDo not forget to click on the Save Changes button to store these settings.

Adding a Table of Contents to WordPress Posts or Pages

Unless you have disabled the auto-insertion, the plugin will now automatically start adding a table of contents to posts based on settings you chose earlier. You will be able to also manage the settings on a post by post basis.

On the post edit screen, you will notice a new section to include and manage the table of contents to your post.

In this section, you will be able to disable auto-insert option for the table of contents on this post specifically. You can also choose which heading level to use for the table items.

Note: In case you modify any setting in this box, then it will override the global settings for this specific post / page.

Once you have written the article with multiple headings, you will be able to simply preview it to view the Table of Contents in action.

The table of contents will appear just above the first heading in your article. Your readers can easily click on links and jump to the section they would like to read.

We hope this blog post helped you quickly learn how to create a table of contents in WordPress posts and pages. You can visit our blog to read more blog posts.

If you liked this blog post, then please subscribe to our YouTube Channel for WordPress video tutorials. You will be able to also find us on Twitter and Facebook.

Leave a Comment