Have you ever felt that you need a subtitle for your posts and pages? Recently in one of our projects, ThemeLab, we needed to add subtitles to some of our pages. We felt that others might need it as well, so in this article we will show you how to add a secondary alternative title or subtitle in WordPress posts and pages.
Live demo of what it looks like on ThemeLab site:
First thing you need to do is install and activate the Secondary Title plugin. Upon activation, you will automatically see an additional title field below your main title on your post edit screen.
Donβt worry if you only want to use it on pages or another custom post type. The plugin comes with its own configuration options which allow you to fine tune how the secondary titles are displayed in the admin area and in your WordPress themes.
If you want to change those options, then you need to click on Settings Β» Secondary Title menu in the WordPress admin menu.
On the settings screen, you can choose post types, categories, and/or specific post IDs where you want to display the secondary title. You can also choose the position of the input box on the post editor screen. This will allow you to display the secondary title box above or below the main post title box.
By default the plugin will automatically display secondary titles however you can stop this by choosing No next to Automatic Insert option.
You can manually display secondary titles in your theme by using <?php get_secondary_title(); ?>
template tag in your theme files. This will give you maximum control over style.
The default format displays secondary title next to the post title separated by a colon, like this:
The Post Title: The Secondary Title
You can change this by specifying your own format in the Title Format option on the pluginβs settings screen.
This is what it looked like on the default Twenty Thirteen theme.
We hope this article helped you add alternate secondary title or subtitle to posts and pages in WordPress. We also have a tutorial on how to hide title for selective WordPress posts and pages should you need to do that.
If you liked this article, then please subscribe to our YouTube Channel for more WordPress video tutorials. You can also join us on Twitter and Google+.