Adding a subtitle to your posts is a great way of being able to create more interest around your post at first glance.
We know that many visitors to your site won’t read passed the title, so adding an interesting subtitle helps put more eyes on the rest of your content.
Today, we’ll look at two ways we can add subtitles to your Genesis blog.
Genesis Subtitles Plugin
The Genesis Subtitles is a Genesis specific plugin that automatically adds the subtitle to the correct place in your posts without any coding needed. It uses the genesis hook (genesis_entry_header ) and also adds some inline styling to make it fit nicely where it should.
The subtitle meta box appears where you would expect it, right under the post title.
This makes it really quick to setup for beginners and easy to use out of the box.
The second way is to use WP Subtitle plugin. This plugin requires you to add the php code to your template for it to appear on your site and comes with no styling.
For us WP Subtitle is the better choice and here are our reasons why.
- Future Proofing: If we, or our clients, ever decide to move onto another theme away from Genesis in a few years our WP Subtitle data for each post can move with us.
- Semantic Markup: Out of the box, the Genesis Subtitles Plugin puts the subtitles in h2 tags, which isn’t correct, although you are able to correct this by adding this code to your child theme.
- Flexibility: As we add the code to our theme ourselves, we can add it wherever and whenever we want.
Using WP Subtitles on Genesis
Adding the subtitle directly after the entry title and before the entry meta makes sense to us, so let’s add it there.
To add the subtitles to our single posts and pages we can add the following code to the bottom of our functions.php file in our child theme.
In the code above, we have given a priority number 11. This is because, by default, the entry meta in the entry header has a priority number 12 and we wanted the subtitle to appear before it. To make it appear after it, you will just need to change it to 13 or 14.
The subtitle will inherit the style of a normal paragraph. We have given the paragraph tag a class ‘subtitle’ so we can use this to add any specific styling that we want.
Enjoy! Now go write some killer subtitles for your posts.