Do you have a WordPress website and you are curious how to add a Wikipedia-like table of contents box to one of your long posts or pages? A table of contents could be useful in long articles to make it easier to find what they are looking for. Readers can check what the article is about right from the beginning and they can easily jump to the part of the article they are interested in. A table of contents is also useful for any website owner because it can help you with SEO since Google results automatically jump to section links when your post appears in its search results.
It is true that you can create a table of contents in WordPress manually, but simply writing HTML code can be difficult for some WordPress users, especially for the beginners. That is why we will show you how to create a table of contents in WordPress without writing any HTML or CSS code.
Create a table of contents in WordPress with a plugin
The very first thing you need to do is to install the Table of Contents Plus plugin. After installation, activate the product and start configuring the plugin settings. It is easier than you think: go to Settings > TOC+ in the admin area of your WordPress.
You will notice there is the Main Options tab, which allows you to decide when and where your table of contents will appear. There is also a default position, “Before the first heading”, and your table of contents will be placed before the first heading tag in your page. However, the plugin allows you to change this position to top, bottom, or even after the first heading.
The next step is to choose when the table of contents should appear. By default, it appears every time a page or post has more than four headings, but you can increase or decrease the number.
Another thing to know is that the plugin will show the table of contents only on pages, but you can easily enable it to generate tables automatically for posts by turning on the option “Auto insert for the following content types”.
What we like a lot about this plugin is that you can also choose between default skins. You can find them under the Presentation option, but there is also a possibility to create your own style for the table of contents box. Make sure you save everything when you finish editing the settings.
How does the plugin work?
It is simple to use the Table of Contents Plus plugin because it automatically does the work, according to the criteria you selected in the settings. It generates the table by default for any page or post which has four heading tags, or as many headings as you decide.
You can also stop the plugin from generating table of contests for a post, with a simple short code:
[no_toc]
If you don’t want a table of contents for most of your pages, simply turn off the auto-insertion option and select manually the posts you want to have a table of contents.
Conclusion
As you can see, adding a table of contents with this plugin is fast and simple. We hope this article helped you, but if you have any questions feel free to leave a comment!