WP Manifestindependent plugin directory
manifest / content / pagetoc

PageTOC

WordPress plugin to generate a table of contents for a page.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/vassar-communications/pagetoc/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

This is a WordPress plugin that generates a hierarchical table of contents for a page.

Setup

This doesn't have an admin panel; pop it in and activate it, and it'll be ready to go. To add a table of contents to a page, add a custom field named has-index and set that to true.

Important!

  • Make sure that the header hierarchy is correct; that is, that h2 elements have h3 children, and h3s have h4 children, etc. Going from h2 to h4 will generate an error. This is something I need to fix.