New Plugin Adds Subtitles to WordPress Posts, Pages and Custom Post Types

In the past, adding subtitles to WordPress posts always required something a little hacky. Sometimes theme authors would hijack post excerpts or use custom fields in order to accomplish it, but these methods made process of adding a subtitle confusing for users.

Subtitles is a new free plugin created by WordPress developer Philip Arthur Moore. It lets you easily add subtitles to WordPress content, including posts, pages, and even custom post types.

Although there are several subtitle plugins already available on WordPress.org, the best feature about this one is that you don’t have to add any template tags to your theme in order to display subtitles. The Subtitles plugin just works – no theme tweaks or coding required.

Once installed you’ll find a new place in the WordPress editor for adding subtitles:

After you add a subtitle to a post and save it, you’ll see it added to the frontend. Here’s one example using the Fictive theme. However, it really doesn’t matter what theme you’re using; the plugin will automatically output your subtitles in a matching style.

Customizing Subtitles

Subtitles will show up in singular, post archives, search results, and can be further extended to display in other views, such as widgets. The markup outputted for them is a span with a specific class you can use to customize their display:

[html light=”true”]Your snappy subtitle[/html]

This makes it super easy for theme developers to add support for subtitles. If you already have subtitles built into your theme, you can make it leaner by cutting out the hacky methods and adding support for the Subtitles plugin instead.

You’re also not locked into the markup it generates. The markup can be changed by hooking a custom output function to subtitle_markup. An example is shown in the plugin’s documentation.

Subtitles are stored in post meta in your database. If you deactivate the plugin or uninstall it, your database will still keep these entries in case you ever decide to use the plugin again. Moore is considering adding an option to a future release of the plugin that would allow you to clean the subtitles post meta from your database.

Subtitles is currently the most well-documented, extensible plugin available for adding subtitles to your WordPress site. It’s available for download on WordPress.org and you can also find it on GiHub.