Skip to content

How to Add a Table of Contents in Elementor?

Table Of Content

Do you want to add a table of contents in Elementor? A long article is much easier to read when the reader can see its sections at a glance and jump straight to the one they came for.

The Table Of Content widget in The Plus Addons for Elementor Pro builds that list for you. It does not ask you to type the sections in: it reads the headings that are already on the page and turns each one into a link.

Requirement – This widget is a part of The Plus Addons for Elementor Pro, make sure it’s installed & activated to enjoy all its powers.

Before You Start

  • Edition: Pro — Table Of Content is only in The Plus Addons for Elementor Pro. With the Pro plugin switched off the widget is not in the editor at all, and a page that already uses it shows nothing where the widget was.
  • Widget to enable: Table Of Content, switched on under The Plus Addons > Widgets.
  • The page needs real headings: the widget does not create headings, it indexes the ones already on the page. Build the article with heading widgets (H2, H3, H4) before you judge the result.

Watch the Video Walkthrough

The same setup, start to finish, in video form.

Youtube video

Step 1: Turn the Widget On

  1. Go to The Plus Addons > Widgets in the WordPress dashboard.
  2. Search for Table Of Content.
  3. Switch the toggle on. The widget carries a PRO badge, so it only appears once the Pro plugin is active.
The plus addons widgets screen with table of content found by search and its toggle switched on

Step 2: Give the Page Some Headings

The widget indexes headings; it never creates them. Build the article first, using Heading widgets with the right tag — H2 for the main sections, H3 and H4 for what sits under them. The list mirrors that nesting, so an H3 placed after an H2 becomes a child of that H2.

Step 3: Add the Widget and Pick a Style

Drag Table Of Content on to the page. In the Layout section, Style offers five choices shown as pictures with no text on them: None (the default, a plain list) and Style 1 to Style 4, which add their own borders, spacing and markers.

Layout section of the table of content widget with the style picture chooser outlined, the table of contents showing beside it in the canvas

Step 4: Choose the List Type

List Type switches the list between UL (bullets) and OL (numbers). It is set to OL to begin with, and it is only shown while Style is None.

List type dropdown outlined in the layout section, set to ol

Picking Style 1, 2, 3 or 4 also drops the numbering: in our test the list rendered as a bulleted list under Style 2 even though List Type was still set to OL.

Step 5: Decide Which Headings Are Listed

Select Tags holds H1 through H6, and all six are selected out of the box. Remove the ones you do not want. On most articles H2 and H3 alone give a list people can actually scan.

Select tags field outlined with only h2 and h3 chosen, and the shorter table of contents in the canvas

Step 6: Collapse the Sub-Items

With Child Collapsed switched on, only the top-level entries show. Clicking one opens its children, and the branch you are reading opens by itself as you scroll past it.

Child collapsed switched on in the layout section, outlined in the panel
Published page with child collapsed on: the sub-items under building your first page and publishing your work are folded away, while the section being read stays open

Step 7: Add a Title, a Description and an Icon

The Content section controls the block above the list. Content itself is on by default and starts with the title Table Of Content; type your own in Title. Description adds a line of text under it, and Icon puts an icon in front of the title.

Title field outlined in the content section, changed to on this page

Description is a rich-text field, so the line under the title can carry bold text or a link.

Description field outlined in the content section with a line of text in it, showing under the title in the canvas

Switching Icon on reveals Select Icon, which starts as an exclamation mark in a circle.

Icon switched on and select icon outlined in the content section

Clearing the Title removes the whole heading block, and with it the collapse control. Keep a Title if you want readers to be able to fold the list away.

Step 8: Stretch It Across the Column

Full Width makes the block fill the width of its container instead of shrinking to fit the longest entry. It is off to begin with.

Full width switched on in the layout section, with the table of contents stretched across the canvas

Step 9: Work Through Extra Options

Most of what changes the way the list behaves sits in Extra Options, and each of those has a guide of its own:

One setting has no guide of its own. Heading Active Offset decides how far down the screen a heading has to be before its entry is marked as the current one. It starts at 1 px and can be set per device.

Heading active offset slider outlined at the bottom of the extra options section

Step 10: Style It

The Style tab is split by the part of the block it changes.

Style tab, heading section, with the typography control outlined
Style sectionWhat it changes
HeadingPadding, margin, typography and colour of the title, the description and the icon, plus the toggle icon and the background of the heading row
ContentPadding, margins, indentation and spacing of the list, and its height, minimum and maximum height and scrollbar
Content LineWidth and colour of the guide line beside the entries, normal and active. Only shown when Style is not None.
Level 1 TypographyTypography and colour of the top-level entries, normal and active
Sub-Level TypographyThe same for the nested entries
Hash TagTypography and colour of the marker and of the Copied label (only while Hash Tag is on)
BoxBackground, border, radius and shadow of the whole block, normal and hover
Style tab, level 1 typography section, with the typography control outlined

Content Line only appears once you pick one of the preset styles, because the guide line it controls is part of those styles.

Style tab, content line section with line width and active line width outlined, and the guide line beside the entries in the canvas

What You End Up With

On the published page the widget builds the list, links each entry to its heading and keeps the entry you are reading marked as you scroll.

Published page: the table of contents on the left lists the headings of the article on the right, with the section being read highlighted

Settings Reference

Layout

SettingWhat it doesDefault
StylePlain list (None) or one of four preset looksNone
List TypeUL for bullets, OL for numbers; shown only while Style is NoneOL
Select TagsWhich heading levels are listedH1, H2, H3, H4, H5, H6
Child CollapsedHide the nested entries until their parent is openedHide
Full WidthStretch the block to the full width of its containerHide

Content

SettingWhat it doesDefault
ContentShow the title block above the listShow
TitleThe heading of the blockTable Of Content
DescriptionA line of text under the titleEmpty
IconShow an icon in front of the titleHide
Select IconWhich iconExclamation mark in a circle

Extra Options

SettingWhat it doesDefault
ToggleLet the reader fold the list away; needs Content onHide
Default OnStart expanded; can be set per deviceShow
Select Open Icon / Select Close IconThe two toggle iconsChevron up / chevron down
Smooth ScrollReveals Smooth Duration and Scroll OffsetHide
Smooth DurationHow long the jump takes, in milliseconds420
Scroll OffsetGap left above the heading you jump to, in pixels0
FixedPin the block while the reader scrollsHide
Fixed OffsetDistance from the top of the screen when pinned0
Hash TagAdd a copy-link marker beside every headingHide
TagThe marker text#
Copy TextShow a Copied label after the clickShow
Hash Tag On HoverShow the marker only on hoverShow
Heading Active OffsetHow far down the screen a heading counts as current1 px
Restricted Container AreaCSS class of the one area to indexEmpty

How It Behaves

  • The whole page is scanned by default. Unless you fill in Restricted Container Area, the widget reads every heading on the page, including headings your theme puts in the page title, header or footer. On our test page the default settings listed 14 entries, two of which came from the theme.
  • Links are built from the heading text. Spaces become hyphens and punctuation such as & ( ) . , : ? # % is dropped, so “Publishing & Maintenance” becomes #Publishing--Maintenance.
  • Repeated headings still work. Two headings with the same text get different links — the second one gets a _1 on the end — and each entry jumps to its own heading.
  • The current entry is highlighted and changes as the reader scrolls through the article.
  • The list is built in the browser after the page loads, so it always matches the headings that are actually on the page.

Limitations

  • The widget is Pro only. On a site running only the free plugin it is not in the editor, and a page that already used it shows nothing where the widget was.
  • Theme headings are indexed too. A page title or a site title in the header shows up as an entry until you set Restricted Container Area.
  • List Type only applies to the None style. Under Style 1 to Style 4 the list rendered with bullets whatever List Type was set to.
  • There is no setting for the link text: an entry always shows the heading exactly as it is written on the page.
  • Removing a level from Select Tags can flatten the outline. On our test page, taking H4 out of the list moved an H3 that had H4s under it up to the top level, alongside the H2 sections. Check the result after you change the tag selection.
  • Clearing Title removes the heading row, which also removes the Toggle control from the published page.

Troubleshooting

The table of contents is empty

The page has no headings inside the area being scanned, or Restricted Container Area points at a class that is not on the page. Clear that field to go back to scanning the whole page.

Entries appear that are not part of the article

They are headings from the theme or from another section of the page. Put a CSS class on the container that holds the article and name it in Restricted Container Area, or add tp-toc-ignore to the headings you want left out.

Nothing changes in the editor when I edit a setting

The list is drawn by JavaScript after the page renders. Save the page and look at the published version; the editor preview does not always redraw it.

The list is too long to be useful

Trim Select Tags to H2 and H3, or switch Child Collapsed on so only the main sections show until a reader opens one.

Related Docs

Related Frequently Asked Questions

Related Docs