Greg’s Plugins for WordPress

Plugins for WordPress

Portfolio of Plugins for Adoption!

Table of Contents Builder

Automatically generate an article’s table of contents, based on its heading tags. Inspired by the original TOC plugin amh-toc (by Andreas Holstenson), and WP Table of Contents (by Laran Evans).

What this Plugin Makes Possible

Automatic table of contents generation is far far more flexible and easier to use than attempting to place hard-coded manual links at the start of an article. With full multi-page support and a choice of automatic insertion or placement via a template tag, this plugin handles all aspects of generating an article’s table of contents.

How it Works

This plugin communicates with WordPress primarily by tapping into the following:

  • the_content
  • wp_head
  • template_redirect

Configuration and Flexibility

Configuration pages for this plugin enable administrators to specify the maximum table of contents depth, the minimum table of contents size, the list type, surrounding markup, and whether to insert the resulting table of contents automatically or only via a custom template tag. Administrators can also specify how to handle some trickiness associated with the timing of scanning post content with respect to the activities of other filters, texturization, and so on.