- This topic has 9 replies, 3 voices, and was last updated 4 years, 11 months ago by
Tom.
-
AuthorPosts
-
April 1, 2021 at 5:52 am #1717810
Bandara
I have a category of posts that includes the “read more” Gutenberg block. They are all standard post types. They all have custom excerpts written in the meta box
I am configuring the blog archive page to have two columns and show the featured image and and the custom excerpt I have written.
However, they are showing the full content up until where the “read more” Gutenberg block is. Is this the expected behaviour? I would have expected this if I had selected “full content”.
I have disabled all plugins other than GP premium and still get this behaviour. I don’t think the solutions on this page apply: https://docs.generatepress.com/article/excerpt-issues/ If they do I will need some coaching to see why.
Is my only solution to edit all these posts and remove the read more block?
April 1, 2021 at 6:21 am #1717847David
StaffCustomer SupportHi there,
its a WordPress function and expected behaviour… the priority is:
1. More Tag
2. Custom Excerpt
3. Auto Excerpt.So a More Tag will override a Custom Excerpt.
Simply DO NOT use a more tag when you have a Custom Excerpt.April 1, 2021 at 7:15 am #1718046Bandara
Ah, thanks!
The reason I didn’t expect that is because I’ve been using the Display Posts plugin and when I use that to show an excerpt, it ignores the more tags. So I was expecting the same behaviour here.
Thanks for such a quick response.
April 1, 2021 at 7:17 am #1718049David
StaffCustomer SupportYou’re welcome!
April 9, 2021 at 6:42 pm #1728241Bandara
its a WordPress function and expected behaviour… the priority is:
1. More Tag
2. Custom Excerpt
3. Auto Excerpt.So a More Tag will override a Custom Excerpt.
Simply DO NOT use a more tag when you have a Custom Excerpt.I just realized this may cause a conflict on my site. I have a custom post type for podcasts. In order to prevent all of the page content from going into the rss feed description field, I have to use the more tag if I want the first part of the page content to go into the rss feed. (this is needed because some of the page content doesn’t work well in an rss feed.)
Do you know any way to override this, or can you give me some of the technical terms I might search for to find the answer on my own?
April 10, 2021 at 3:45 am #1728469David
StaffCustomer SupportJust to be clear – you would require the More Tag to be used for the RSS feed – and the Manual Excerpt to be used for the Post Archives ?
April 10, 2021 at 4:50 am #1728535Bandara
Yes. The issue is that the podcast plugin I use (Seriously Simple Podcasting) creates a custom post type for the episodes. On those episode pages I use some blocks that end up mucking up the rss feed. So I put the read more break before the fancy stuff.
But for the tag, category, and post type archive, I would rather use the manual/custom excerpt.
April 11, 2021 at 8:51 am #1730039Tom
Lead DeveloperLead DeveloperHi there,
You could try something like this:
add_filter( 'generate_more_tag', function( $more_tag ) { if ( ! is_feed() ) { return ''; } return $more_tag; } );Let us know 🙂
April 19, 2021 at 9:08 pm #1741075Bandara
I think that did it. Thanks! You guys are amazing.
April 20, 2021 at 7:16 am #1741926Tom
Lead DeveloperLead DeveloperNo problem! 🙂
-
AuthorPosts
- You must be logged in to reply to this topic.