Notice: There is no legacy documentation available for this item, so you are seeing the current documentation.
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.
WordPress Blocks only work with the WordPress Block Editor. They don’t work with the Classic Editor or any page builders.
In This Article
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.
There’s only one setting which is for the List Style. You can choose to have your table of contents displayed as a bulleted list or a numbered list.
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.
Changing the order of the items in the Table of Contents doesn’t affect the position of headings in your content. It only affects the order of your table of contents.
Editing the Links in the Table of Contents
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.