Archived topic
Post Excerpt not working in element on default blog page
7 replies · Started by Rachel on December 25, 2021
Hello! I'm using the Stream site template, and trying to create an element for the posts. But I can't get the post excerpt to work properly.
If I leave the excerpts empty on each post then nothing shows up. If I add an excerpt, the whole thing shows up instead of being limited by the settings. Also the styling is being removed from the "Read More" button I've added.
I tried the advice in this article, but still no fix. Any other advice? (Links to the site and screenshot in private info)
Hi there,
Does the excerpt display correctly without a block element content template?
Let me know :)
If I set my block element as a draft (that's the way to turn it "off" right?) and try to control the blog page layout with the settings under "Customize" -> "Layout", I am only seeing the excerpt where I have explicitly entered it, and the whole thing is showing rather than being limited by those settings.
Ahh it's because you are using GenerateBlocks to create your post content.
There is a WordPress core issue with the nested block that WP still needs to fix:
https://generatepress.com/forums/topic/excerpt-blank-for-some-generateblocks-combinations/#post-1321454
Thank you Leo!
So if I understand correctly, the reason the excerpts won't show is because of a WordPress code related issue, so there is no way around that - it's just impossible until WP fixes their code.
The only way I can have short excerpts on my blog page is if I manually type in excerpts to each post and keep them to the length I want. Correct?
If you just simply use a paragraph block then the excerpt will work.
The issue is that your content is wrapped in GB's container block.
The only way I can have short excerpts on my blog page is if I manually type in excerpts to each post and keep them to the length I want.
This isn't the only way but I think it's the best way.
Ok, I guess that's what I'll do then, thank you again!
Happy Holidays :)
No problem :)
You as well!