WP Manifestindependent plugin directory
manifest / content / pagetoc

PageTOC

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

by Chris Silverman · github.com/vassar-communications/pagetoc · website

0stars
0forks

Install

No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:

wp plugin install https://github.com/vassar-communications/pagetoc/archive/refs/heads/main.zip

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.