• Short version:

    Is there a way to add a Subtitle to a post so that it is treated like dynamic content?

    Long version:

    I want to be able to add both a Title and a Subtitle to some (but not all) of my posts. There doesn’t seem to be a way to do it. My thought was to use the excerpt field and the Post Excerpt block as a work around but for any post where I don’t specify an excerpt, WordPress automatically generates one.

    So… Is there a way to add a subtitle to the post query? Or, failing that, is there a way to have WordPress stop auto-generating content in the Post Excerpt block unless I create that excerpt when I create (or edit) the post?

    Thanks in advance for any advice or help.

    • This topic was modified 1 year, 8 months ago by palliso13.
Viewing 9 replies - 1 through 9 (of 9 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    You’d need to create a custom field for that. I’d use te Advanced Custom Fields plugin for that. Then, you’ll need to update your theme (or child theme it) to display that field.

    Thread Starter palliso13

    (@palliso13)

    Thanks… I tried the plugin but it seems a little advanced for my admittedly limited skill level. I was able to add the field I want to the edit screen but can’t figure out how to make the input for that field show up in the finished post.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Yeah, that’s the hard part. Look at how to create a child theme.

    Moderator bcworkz

    (@bcworkz)

    To expand on Steve’s reply since you sound a little hesitant (which is fine), you’d want to add a line similar to the following on an appropriate template file:
    echo get_post_meta( get_the_ID(), 'your_field_name', true );

    This does need to be within “The Loop” on a template. Copy the template file you want this on from your main theme to your child theme.

    Thread Starter palliso13

    (@palliso13)

    Thanks. Hesitant might be an understatement. I don’t really know anything about the coding side of WordPress, so I was hoping there was an easy plugin or block-based solution.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Did you try typing “subtitle” into the search box on the plugins page? https://www.ads-software.com/plugins/wp-subtitle/

    https://www.ads-software.com/plugins/search/subtitle

    Thread Starter palliso13

    (@palliso13)

    I did. But those require inserting code, which is not something I’m very knowledgeable about.

    Moderator bcworkz

    (@bcworkz)

    Adding the suggested code to a template is possibly only part of the task at hand. To prevent the edit from disappearing if your theme is subject to periodic updates, the altered template should reside in a child theme. I think you’ll find properly creating one at your skill level to be challenging. The only good part is if you have any problems with your child theme, you can always revert back to the parent theme (and not have the custom field appear).

    If you’re not up for such a challenge, you could hire someone to do this for you from places like https://jobs.wordpress.net/ or https://jetpack.pro/. Arranging paid help in these forums is not allowed. I also recommend ignoring any unsolicited offers of paid help that might result from this topic. You don’t want someone who’s possibly untrustworthy altering your site’s code.

    Thread Starter palliso13

    (@palliso13)

    Thanks for the advice. I appreciate it.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Subtitles for posts’ is closed to new replies.