
Long posts lose readers who cannot find the part they came for.
A table of contents fixes that. It lists the sections of your post at the top, and each line is a link that jumps straight to that section.
This guide shows you how to add a table of contents in WordPress two ways: automatically with a free block, and manually with no plugin at all.
Quick answer
WordPress does not include a table of contents block (checked on WordPress 7.1). The easiest way to add one is the free Table of Contents block from Ultimate Blocks:
- Go to Plugins > Add Plugin, search for Ultimate Blocks, then install and activate it.
- Open your post, type
/table of contentsbelow the introduction and press Enter. - The block builds the list from your headings and keeps it updated. Click Save.
No plugin? Give each heading an HTML anchor, then link to it from a list with a # in front of the anchor name.
The box below is a live Ultimate Blocks Table of Contents block, built from the headings in this post. Click any line to try it.
- What is a table of contents in WordPress?
- Which method should you use?
- Method 1: Add a table of contents with Ultimate Blocks (free)
- Method 2: Create a table of contents manually (no plugin)
- Other table of contents plugins
- Where should you put a table of contents?
- Does a table of contents help SEO?
- Why is my table of contents not working?
- Frequently asked questions
- Final thoughts
What is a table of contents in WordPress?
A table of contents (often shortened to TOC) is a clickable list of the headings in a post or page. Each item is an anchor link that takes the reader to that section.
It is most useful on:
- Long tutorials and how-to guides
- Roundups and comparison posts
- Documentation and knowledge base articles
- Pillar pages that cover a topic from start to finish
A short post with two or three headings usually does not need one.
Which method should you use?
| Method | Best for | Plugin needed? | Updates when you edit headings? |
|---|---|---|---|
| Method 1: Ultimate Blocks | Most block editor users, any post length | Yes (free) | Yes, automatically |
| Method 2: Manual (no plugin) | One or two short posts | No | No, you update every link yourself |
Our pick: use Method 1 unless you only need a table of contents once. The manual method works, but every renamed heading means a broken link to fix.
Method 1: Add a table of contents with Ultimate Blocks (free)
Best for: anyone using the block editor who wants a table of contents that builds and updates itself.
Ultimate Blocks is a free block plugin active on 50,000+ WordPress sites, rated 4.9 out of 5 from 700+ reviews on WordPress.org. Its Table of Contents block reads your headings, gives each one an anchor and builds the clickable list for you.
Step 1: Install Ultimate Blocks
- In your WordPress dashboard, go to Plugins > Add Plugin.
- Search for Ultimate Blocks.
- Click Install Now, then Activate.
Step 2: Add the Table of Contents block
- Open the post or page in the block editor.
- Click where the list should go. Right after the introduction works best.
- Type
/table of contentsand press Enter, or click the + (Block Inserter) button and search for Table of Contents. - The block fills in from your headings straight away. If the post has no headings yet, add them and the list appears.
Step 3: Choose which headings to show
- Allowed Headings: in the block sidebar, tick the heading levels to include, from H1 to H6. Most posts work best with H2 and H3 only.
- Shorten an entry: click the pencil icon next to it and type new text. The heading on the page does not change.
- Hide an entry: click the trash icon next to it. The heading stays on the page.
- Rename the title: click the block title and type your own, such as “In this guide”, or clear it to show no title.
Step 4: Style it and set up scrolling
Select the block and use the block sidebar:
- Layout: show one, two or three columns, as a bulleted, numbered or plain list.
- Collapsible: let readers show or hide the list, choose whether it starts open, and start it closed on phones.
- Scroll: turn on smooth scrolling and set a scroll offset so a sticky header does not cover your headings.
- Styles tab: change font sizes, title and list colors, border, padding and spacing.
Click Save and open the live post to test a few links. The Table of Contents docs explain every setting.
Add a sticky table of contents (Pro)
On very long guides, readers forget the list once they scroll past it. Ultimate Blocks Pro adds a sticky table of contents, a floating button that opens the list from anywhere on the page, plus icons in place of bullets. Plans start at $39 a year for one site, and every plan has a 30-day money-back guarantee.
See the steps in our guide to adding a sticky table of contents.
Method 2: Create a table of contents manually (no plugin)
Best for: a single short post where you do not want to install anything.
WordPress has no table of contents block, but every heading has an HTML anchor field. You can use it to build a list of jump links by hand.
Step 1: Add an HTML anchor to each heading
- Click a heading in your post.
- In the block sidebar on the right, open the Advanced panel. If the sidebar is hidden, click the Settings icon at the top right.
- Type a short, unique name in HTML anchor, such as
pricing. Use hyphens, not spaces. - Repeat for every heading you want in the list.
Step 2: Make a list of your sections
Below your introduction, type /list and press Enter to add a List block. Add one item for each heading, in the same order as the post. Our guide to bullet points and numbered lists covers list styling.
Step 3: Link each item to its anchor
- Select the text of a list item.
- Click the Link icon in the toolbar, or press Ctrl+K (Cmd+K on a Mac).
- Type # followed by the anchor name, such as
#pricing, and press Enter. - Repeat for each item, then click Save.
Downside: nothing updates for you. If you rename a heading or add a new section, you must update the anchor and the list yourself.
Other table of contents plugins
If you use the Classic Editor or a page builder, or want a table of contents added to every post automatically, these plugins are also active and maintained:
| Plugin | Best for | Free version | Works with | Last updated |
|---|---|---|---|---|
| Ultimate Blocks | Block editor users who want a TOC block plus other content blocks | Yes (sticky TOC in Pro) | Block editor | Nov 8, 2026 |
| Easy Table of Contents | Adding a TOC to every post automatically, including page builders | Yes (block and sticky TOC in Pro) | Classic Editor, block editor, Elementor, Divi, WPBakery | Nov 16, 2026 |
| Table of Contents Plus | Set-and-forget automatic TOC on long posts | Yes | Any editor (auto insert) | Sep 17, 2026 |
| Rank Math SEO | Sites that already use Rank Math | Yes (TOC block is free) | Block editor | Nov 10, 2026 |
| Heroic Table of Contents | A simple, single-purpose TOC block | Yes | Block editor | Sep 14, 2026 |
- Easy Table of Contents is active on 600,000+ sites. It inserts a table of contents automatically by post type, and works with the Classic Editor and major page builders.
- Table of Contents Plus is active on 200,000+ sites. It adds a table of contents to every long post once a post has enough headings, with no block or shortcode to insert.
- Rank Math SEO includes a free Table of Contents by Rank Math block for the block editor. It needs the Schema module turned on.
- Heroic Table of Contents is active on 5,000+ sites and offers four built-in styles.
- Yoast SEO users: the Yoast table of contents block is part of Yoast SEO Premium, not the free plugin.
We compare more options in our list of the best table of contents WordPress plugins. Want the list in your sidebar instead? See how to add a table of contents in the WordPress sidebar.
Where should you put a table of contents?
- After the introduction: readers see what the post covers before they start scrolling. This is the most common spot.
- Before the first H2: keeps the intro short and puts the list where the main content begins.
- In a sticky button or sidebar: best for very long guides, so the list is always one click away.
Avoid placing it at the very bottom of a post, where few readers will see it.
Does a table of contents help SEO?
A table of contents is not a direct ranking factor, but it helps in three practical ways:
- Readers find answers faster, which makes long posts easier to use.
- Google can show section links: jump links can help Google show “Jump to” links for your page in search results.
- Clear structure: a list of descriptive headings shows search engines and AI assistants what each section covers.
For best results, write headings that describe the section clearly, and keep one H1 (your post title) with H2 and H3 headings below it. Good headings also make great targets for internal links.
Why is my table of contents not working?
- The list is empty: the block lists your Heading blocks. Text that is only bold, not a heading, will not appear.
- A heading is missing: check that its level is ticked under Allowed Headings, and that you did not hide it with the trash icon.
- Links stop below the heading: a sticky header is covering it. Set a scroll offset in the block’s Scroll panel.
- Manual links do nothing: anchors are case-sensitive, and the link needs a # while the HTML anchor field does not.
- Changes do not show: save the post, then clear your cache and reload the page.
Related guides:
- How to add a sticky table of contents in WordPress
- Best table of contents WordPress plugins
- Table of Contents block use cases
- How to add anchor links in WordPress
- How to add a table of contents in the WordPress sidebar
Supercharge Your WordPress Block Editor!

Black Friday deal: until December 2, 2026, use code BF2026 for 50% off Ultimate Blocks Pro, or get 40% off the full WP Block Suite bundle.
Frequently asked questions
Does WordPress have a built-in table of contents block?
No. WordPress 7.1 has no table of contents block in core. You can build one by hand with HTML anchors, or add one with a free block such as the Ultimate Blocks Table of Contents block.
Does the table of contents update automatically?
With the Ultimate Blocks block, yes. When you add, remove or rename a heading, the list updates to match. A manual table of contents does not update, so you must edit the links yourself.
Can I add a table of contents without a plugin?
Yes. Add an HTML anchor to each heading in the Advanced panel, make a list of your sections, and link each item to # plus its anchor name.
How do I hide a heading from the table of contents?
In the Ultimate Blocks block, click the trash icon next to that entry. The heading stays on the page. You can also untick a whole heading level under Allowed Headings.
Is the Ultimate Blocks Table of Contents block free?
Yes. It is part of the free Ultimate Blocks plugin on WordPress.org. The sticky table of contents and list icons come with Ultimate Blocks Pro.
Can I add a table of contents to every post automatically?
Ultimate Blocks adds one per post where you place the block. If you want one inserted on every post with no block, use an auto insert plugin such as Easy Table of Contents or Table of Contents Plus.
Final thoughts
The fastest way to add a table of contents in WordPress is the free Ultimate Blocks Table of Contents block: add it once and it builds and updates the list from your headings. The manual HTML anchor method works too, but it is best saved for one or two short posts.
Your next step: open your longest post and add the Table of Contents block right after the introduction.
Found this helpful? See more of us on Google.
Add UltimateBlocks.com as a preferred source and our WordPress guides will show up more often in your Top Stories, AI Overviews and AI Mode.
Free, one tap, remove anytime


























Leave a Reply