How to Add Subtitle for Posts and Pages in WordPress

169

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:

ThemeLab Subtitle

Video Tutorial

 

Subscribe to WPBeginner

If you don’t like the video or need more instructions, then continue reading.

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.

Alternate title box for the secondary title in WordPress post editor

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.

Secondary Title Settings

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.

Choose the display format for secondary title

This is what it looked like on the default Twenty Thirteen theme.

A WordPress post with secondary title

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+.