Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 707 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 707 Bytes

HM Table of Contents

WordPress plugin with the following features:

  • Generate table of contents that lists all headings (Ordered hierachically) in post content.
  • Automatically add anchors links after all headings in post content.
  • Block to add these to pages and template.
  • Adds 'active' class to the current heading in the table of contents.

FAQ

I don't want to automatically add anchor links to headings.

You can remove the filter that adds these with the following snippet. Doing it like this means that the plugin will still ensures headings all have IDs.

// Don't append an anchor link to each heading.
add_filter( 'hm_toc.contents.anchor_html', '__return_empty_string' );