Skip to content

Add Anchor Links adds an anchor link to the headings in your post content, just like GitHub does in Readme.md files. Authors don’t have to add IDs and links by hand, and readers can share a link straight to a specific section. It’s a great fit for long articles, tutorials and documentation.

What it does

  • Heading anchors: every heading in the content gets an ID and a link anyone can point to.
  • Selected content types: you choose which post types get the links.
  • Unique anchors: headings with the same name get distinct IDs, such as overview, overview-2 and overview-3.
  • Headings with attributes: the link sits correctly even on headings with custom classes or other attributes.
  • No plugin styles: turn off the plugin’s CSS when you style the links yourself.
  • Calling from code: add anchors to text outside the post content, straight from your own template.

Settings

Set the post types and CSS loading in Settings → Add Anchor Links. You can also turn the styles off with the constant define( 'ADD_ANCHOR_LINKS_DONT_LOAD_CSS', true ); in wp-config.php. For custom calls, use the \Kybernaut\AddAnchorLinks::add_anchors( $string ) method.

Get involved

The plugin is free and open source. Reporting a bug, suggesting an improvement or leaving a review helps it most.

Do you need customisation?

Modifications that will enhance the plugin development and help other users I offer for “adoption”. You pay half the development cost and I’ll deliver the other half for free.

If the modifications are only of limited use, are only for your usage, or do not match my idea of the plugin’s direction, they are charged at full price.