-
gedosan
Hi there
How do you add a subtitle below the main title that sits above the featured image, as you see here:
https://www.which.co.uk/money/tax/capital-gains-tax/capital-gains-tax-if-you-sell-a-business-abgei4X5P9iVIdeally, the copy is added in the post edit window so it’s easy to add (I don’t want to create a new element for each post).
Thanks!
Ged -
Hi there,
in the example the “subtitle” is the excerpt of the post, if you look at the archives on that site yau will see the text is the same.
Is that a requirement on your site ? ie. the subtitle is the archive excerpt.
-
gedosan
Hi David,
I don’t need subtitles to appear on the archive pages (I choose not to show them there), but I do like the idea of using excerpts as they’re easy for my writers to populate (i.e., the excerpt field is in the post admin screen).
Thanks
Ged -
OK then use the manual Excerpt field in the editor.
And then:1. In Appearance > GeneratePress activate the Elements Module.
2. Then create a new Block Element in Appearance > Elementshttps://docs.generatepress.com/article/block-element-hook/
3.Set the Hook to
after_entry_title
4.Set the display rules location to: `Posts -> All Posts
5 in the Editor add a GB Headline block, and in the sidebar Dynamic Data settings, activate that and set its Content Source to show the Excerpt.
https://docs.generateblocks.com/article/dynamic-data-options-overview/#content-source
-
gedosan
Great, I’ve got that working. This is fine for new posts that I add an excerpt for. The only issue is that none of my old posts have excerpts yet. For those I get a ‘Read More’ that appears. I noticed a “Use default more link” in the element sidebar, I turned that off, but I still get a “…” where the excerpt goes.
Obviously I could just go over all old posts and update them, then switch this on, but that could take forever. Or I could just target the posts that have an excerpt in display settings, but that would be a bit tedious. Anything else you can suggest to NOT show the excerpt for posts that don’t have it yet?
Thanks
-
Fernando
Hi Gedosan,
Excerpts should be generated automatically if no manual excerpt is set.
Can you provide a link to a post that has no excerpt appearing?
What excerpt length did you set as well?: https://docs.generateblocks.com/article/dynamic-data-options-overview/#excerpt
-
gedosan
Don’t worry, I’ll just update the excerpts for old posts. Thanks for the help.
-
Fernando
You’re welcome, Gedosan!
- You must be logged in to reply to this topic.