Site logo

Archived topic

Adding subheading below post title

6 replies · Started by Matthew on December 21, 2022

Viewing posts 1–7 of 7

On TheDesk.net, I use a Subheading plugin: https://wordpress.org/plugins/subheading

The Subheading plugin wants me to insert the following code wherever I want the subheading to display:

<?php if (function_exists('the_subheading')) { the_subheading('<p>', '</p>'); } ?>

On my old theme, I had the subheading appear below the title, but above the date and author line. On GeneratePress, I'm not seeing where in the theme editor I should add the PHP code to make it so the subheading appears below the title but above the date and author line.

It seems like it should have worked, but it didn't...

This is what the site looks like now...

https://imgur.com/Y6XodqV

For reference, what's the sub-heading for this specific post in your screenshot?

Can you try adding a static text to the Hook to first check if it's adding?

For example, add this in your Hook Element:

<p>Sub-Heading</p>

Let us know if it appears.

The subheading should read:

"A last-minute funding deal fell through, leaving the company in an extremely difficult position."

I added the <p> code but that didn't do anything, either.

Update: Got it to work. While the installation instructions suggested that particular line of PHP, the plugin itself actually suggested adding this to the hook:

<?php the_subheading(); ?>

...d'oh.

Still, wouldn't have thought to add it as a hook element in the first place, so thank you for your help!

I see. Glad you resolved the issue! You're welcome, Matthew!

This archived topic is closed to new replies.