Adding a Table of Contents to Your Site Using All in One SEO

Did you know you can easily add a Table of Contents to your site using All in One SEO?

All in One SEO makes it easy to add a Table of Contents to your site so that visitors can easily navigate long content. Search engines sometimes use Table of Contents in search results or rich snippets, which can help you increase your rankings.

Tutorial Video

Adding the Table of Contents Block

To get started, edit any content using the WordPress Block editor and click the Add Block icon.

You can search for the block by typing AIOSEO in the search field.

You’ll see the AIOSEO – Table of Contents block in the search results. Click on it to add it to your page.

By default, the block will be empty as seen below, unless you have headings in your content.

How the Table of Contents Block Works

When you have H1 to H6 headings in your content, then these will be shown in the Table of Contents block as shown below:

In the example above, the first two headings are H2's, and the last two headings are H3's which is why they're indented.

Table of Contents Block Settings

When you select the Table of Contents block, you’ll see some settings in the sidebar.

Table of Contents Block settings

The following settings are available:

  • List Style – This setting lets you can choose to have your table of contents displayed as a bulleted list or a numbered list.
  • Collapsible – This setting lets you choose whether to have your table of contents displayed collapsed or not. If you select to have your table of contents collapsed, then you'll see options to set the title that's displayed when the table of contents is collapsed, and the title that's displayed when the table of contents is uncollapsed.

Table of Contents shown collapsed.

Table of Contents shown uncollapsed.

  • Synced Table of Contents – This setting lets you create a unified table of contents from separate tables of contents throughout your content. For example, if you have a long post with multiple sections, each section can have its own table of contents, and you can have a top level table of contents at the top of the post.

Reordering the Table of Contents

You'll also see some buttons and icons on the Table of Contents block.

In the top right corner is a Reorder button. Clicking this button will display a popup box where you can drag and drop the items in the table to change their order.

Once you've changed the order of the items in the table, click Done to close the popup.

There are two icons in the Table of Contents block.

The link icon enables you to change the anchor link that links the item in the table to the heading in your content.

Click on the link icon to edit the anchor link.

Once you've edited your link, click the X to save and return to the Table of Contents block.

Hiding Items in the Table of Contents

The visibility icon enables to you to hide items in the Table of Contents that's displayed on your site.

In the image below, the visibility of the item is set to hidden so it won't be visible in the Table of Contents on your site.

Once you're done making changes to your Table of Contents block, click Done to save your changes.