Beginner's Guide for WordPress / Start your WordPress Blog in minutes

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

Did 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 want to read. In this article, we will show you how to create a table of contents in WordPress posts and pages without writing any HTML or CSS.

Adding table of contents to WordPress posts or pages

Why Add Table of Contents in WordPress Posts?

You may 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 want to read in long articles.

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

Jump to link in search results

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

But there’s an easy way. Let’s take a look on how to easily create a table of contents in WordPress posts and pages.

Video Tutorial

Subscribe to WPBeginner

If you don’t want to watch the video tutorial, then you can continue reading the text version below:

Creating a Table of Contents in WordPress

First thing you need to do is to install and activate the Easy Table of Contents plugin. For more details, see our step by step guide on how to install a WordPress plugin.

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

Table of contents settings

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

Typically, we don’t recommend adding a table of contents on every article unless all of your articles are really long.

Next, you can scroll down to change the appearance of the table of contents box. From here you can select a theme, adjust width and height, set the font size, or create a custom color scheme for your table of contents box.

Table of contents appearance

After that, you need to go to the Advanced settings section. The default options would work for most websites, but you can review these options to see if you would like to adjust anything.

Advanced settings for table of contents

Don’t 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 can also manage the settings on a post by post basis.

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

Table of contents settings in posts

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

Note: If you change 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 can simply preview it to see the Table of Contents in action.

Table of contents box

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

We hope this article helped you learn how to create a table of contents in WordPress posts and pages. You may also want to see our guide on how to appear in Google answer boxes with your WordPress site to get more search traffic.

If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.

Disclosure: Our content is reader-supported. This means if you click on some of our links, then we may earn a commission. See how WPBeginner is funded, why it matters, and how you can support us.

The Ultimate WordPress Toolkit

Get FREE access to our toolkit – a collection of WordPress related products and resources that every professional should have!

Reader Interactions

58 CommentsLeave a Reply

  1. How can I manually place the TOC on specific pages? It seems I can only disable auto-insertion but I can’t then decide where I want to put the table on the page. Is this possible?

    • The table of contents would need to be enabled for pages and then there should be an option when editing the specific page you want to add it to.

      Admin

  2. What a tutorial and very helpful for me and other who want to add new features in their websites and in blogs. In very short words you explain exceptionally.

  3. My developer created a Table of Contents on a really long blog I wrote. I edited one of the entries and the link fell off.

    When I try to create a new entry it says “Paste URL or type to search.” If I add the URL, it will take the reader to the top of the blog not the exact place inside the blog.

  4. this video shows me how to create a table of contents within a post. I want to create a table of contents for my entire blog so that the title of each article appears in the TOC. How do I do that?

  5. Hi thank you for this informative post!
    Only a small question, what is “override the global settings for this specific post / page.”
    I chose to insert the table of content manually, and when i check only for h2 & h3, the table of content just doesn’t show up at all.

    Thank you!

    • That would mean you are telling it to ignore your default settings for the plugin for that specific post/page. If you have no H2 or H3s on the page then there wouldn’t be anything for the plugin to add to the table.

      Admin

  6. Why wpbeginner don’t recommend using TOC unless it’s really long ?
    How long is too long ?

    • If the page is too short to scroll then there wouldn’t be a reason to have a table of contents. It is a personal preference for the length of a post.

      Admin

  7. Hi, very helpful article

    But….

    Table of content isn’t showing in Mobile, what to do…

    i use AMP plugin also…

    • Your AMP plugin would be removing the plugin’s additions. If you reach out to the table of contents plugin’s support they can let you know if they have AMP support.

      Admin

  8. Good afternoon!

    Congratulations on the article, it helped me a lot :)

    However, it just didn’t work on amp pages.
    Note: I use the “Accelerated Mobile Pages” plugin.

    How can I solve?

    Thank you!

    • You would want to reach out to the plugin’s support for if there is a recommendation for AMP.

      Admin

  9. Using easy table of contents, is there an option to create hyperlinks to jump to that particular section when you click on one of the headings in the table.

    Not sure if I’m missing something with the plugin, but when I click on the headings it doesn’t jump to that section at all.

    thanks

    • The plugin should be allowing that, you may want to ensure there is enough room between your content and you don’t have any browser addons that would prevent scrolling to a certain section of your page.

      Admin

  10. I’ve checked “Initially hide the table of contents” but the TOC shows every time I open a post with a TOC. Is there something else I need to do?

    • You would want to reach out to the plugin’s support to ensure this is not a conflict between the plugin and your theme

      Admin

  11. As usual, amazingly detailed and helpful. You guys have definitely become my go-to resource for anything blogging related.

    • You would need to enable custom CSS and depending on your theme would determine the CSS needed

      Admin

    • You would enable support for the post type you want to have the table of contents in and when you edit one of the types where it is activated, it will have the option at the bottom of the editor to add the table of contents

      Admin

    • In the plugin’s settings you would enable support for pages and you should be able to follow the same procedure for pages that you do for posts.

      Admin

  12. Hi, is this possible to show/hide individual headings, just by clicking on it, like on Wikipedia?

    I have too many subheadings under each h3 so I want it to be easier to navigate.

  13. I have installed this plugin on my blog following the guideline in this post. But it’s not showing up on my posts. Is there anything I’m doing wrong? I really need this to ASAP

    • Hello,

      Please review plugin settings, you need to enable support for the posts and pages. After that edit the post and page and below the post editor you will find TOC settings. From here, you need to check the box ‘Insert table of contents’ to add it in that particular post.

      Admin

  14. Thanks for the article it’s working for me, But I am getting with bullets and numbers, in TOC_Box how to change it. I already numbered with h2 tags.
    so its repeated the numbers twice.

  15. Thank you so much! I used this for my Exclusives Library and I love it! Now my subscribers won’t have a difficult time looking for their printables.

    XOXO,
    Mae

  16. A fine plugin, but is there any way I can exclude pages? Writing in headings and using * and ⎮ does not work, for me anyway. I am not a tech guy so it could be I just need a bit of explanation.

    Thanks in advance.

  17. This is best plugin but when i created table of content from this plugin then showing multiple H1 tag which is not good at seo point of view.
    How to solve this ?
    Thanks

  18. Thanks. Your article came at the right time for me! I was just now looking for something like this for a client of mine.

Leave a Reply to Rianne Cancel reply

Thanks for choosing to leave a comment. Please keep in mind that all comments are moderated according to our comment policy, and your email address will NOT be published. Please Do NOT use keywords in the name field. Let's have a personal and meaningful conversation.