A Useful WordPress Plugin For Those Who Write Long-form Content

Developed by George Stephanis, Add IDs to Header Tags is a WordPress plugin that adds an `id` attribute to header tags in posts. This enables users to deep-link into your content. This is especially helpful to those who consistently publish medium to long form articles.

Adding ID Tag To Headers

ID Tags are added to headers within content as long as they’re not already in use. The plugin contains no settings to configure, so it’s only a matter of installing it and using header tags within content. A future version of this plugin might add the option to remove the link. Also, George specified that this plugin does not make any changes to the database content.

It’s just a filter on the_content — no change of the db content. The anchor is optional, it adds an ID to the h# tag.

This plugin is incredibly simple to use. Since WPTavern routinely publishes long form content, the linked header tags will come in handy. A side benefit to this plugin is that deep links are added to content already published. This means you won’t need to go through your content history and add any sort of shortcodes.


3 responses to “A Useful WordPress Plugin For Those Who Write Long-form Content”

  1. You definitely would never use shortcodes for that, since you can just add the ID’s to each heading anyway.

    Seems like a useful plugin though. It would be handy to have all those headings ID’s automatically.

  2. @Ryan Hellyer – Well, shortcodes is the first thing that came to mind. I think a plugin like this with the type of content we publish is a small amount of effort with a big gain. Can these H3 Id’s be created automatically by the theme, and thus reducing the need for a plugin?

  3. @Jeffro – You could write a plugin which added them automatically to the actual content stored in the DB. But I kinda like how this plugin doesn’t mess with the database and just adds them dynamically. No point in cluttering the database needlessly if you don’t have to.

    Putting the plugin in a theme would be unwise as when you changed themes, all your old anchor links would break.


Subscribe Via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

%d bloggers like this: