Table of Contents Block

The PublishPress Table of Contents block allows you to show a Table of Contents for your posts created with Gutenberg. WordPress automatically creates this Table of Contents using the headings in your post. This blocks enables you to place that Table of Contents so your visitors can see it.


How to create the PublishPress Table of Contents block #

You can create a PublishPress Table of Contents block by clicking the “Table of Contents – PublishPress” button in the PublishPress Blocks category.

Important: before you do this, we recommend that you create at least one Heading tag in the post or page.


How to use the PublishPress Table of Contents block #

The Table of Contents can be aligned to the Left, Center or Right. To update it, use the Update Summary button.

On the right panel, there are some options that you can adjust:

  • Load minimized: If you enable this feature, the Summary will be hidden by default. Users will need to click the Summary header title text to see the Summary.
  • Summary header title: This is shown when the Load minimized option is enabled
  • Anchor color: pick a color for the Summary links.

Accordion support (Pro) #

The headings of the accordions can be included in the Table of Contents block.


Default settings for all your PublishPress Table of Contents blocks #

You can set default options for every PublishPress Table of Contents block added to your site. This is possible with the PublishPress Blocks default configuration feature and it allows you to create a consistent look-and-feel for all your table of contents.

Go to Blocks in your WordPress admin menu, then PublishPress Blocks.

Click Table of Contents settings icon.

Adjust the default settings and save.