- This topic has 20 replies, 4 voices, and was last updated 2 years, 8 months ago by
David.
-
AuthorPosts
-
February 10, 2019 at 2:45 am #806441
Ole
Hello,
I have got a problem on my website. The excerpts are not shown on all blog posts. I can not figure out why some are missing on the front page. WP is 5.0.3 and all plugins are updated.
I have tried to change excerpt settings and save. But it does not fix the problem.
Please help. Thanks in advance.Best regards,
OleFebruary 10, 2019 at 8:36 am #806705Tom
Lead DeveloperLead DeveloperHi there,
The one thing I’m noticing is posts with their first paragraph not inside a Kadence block are showing the excerpt.
Have you tried implementing a manual Excerpt using the Excerpt metabox?
February 10, 2019 at 10:11 am #806765Ole
Hello Tom,
You are right. I have changed the second article which is now showing the exerpt.
It might be a problem with the newest Kadence together with GeneratePress. It has not been a problem before.
How can I figure out where the problem is?
Thank you for the support.
February 10, 2019 at 10:51 am #806788Leo
StaffCustomer SupportIt’s likely Kadence Block as GP doesn’t deal with the editor or the excerpt itself. They are handled by WordPress.
I would recommend checking with their support first.
You can also test by switching to a twenty series WordPress theme temporarily and see if the issue still exists.
February 10, 2019 at 11:44 pm #807060Ole
Thanks for the great help. I have contacted Kadence.
February 11, 2019 at 8:25 am #807454Tom
Lead DeveloperLead DeveloperNo problem 🙂
January 27, 2021 at 6:19 am #1635491piotr
Hello there
I have exactly the same problem. My post overview page uses the Kadence block post grid. Text excerpt is displayed, text from the post is not.
But only if this text is in a blog grid (In my example even in a GenerateBlocks grid!). If I insert the text without a grid, the excerpt text also appears on the post overview page.What can I do to fix this problem?
Thanks in advanceJanuary 27, 2021 at 6:31 am #1635508David
StaffCustomer SupportHi there,
this is a core WP issue, the excerpt function doesn’t parse nested blocks content. You will have the same issue if you use a core Group Block.
The workaround is to use a Manual Excerpt in your posts.
February 14, 2022 at 6:06 am #2117823Markus
Hi,
I have been extensively testing different structures with GenerateBlocks and/or native Gutenberg Blocks to see in which cases the excerpt is shown and when not shown in a grid created with the WP Query Loop Block.
My conclusion is that posts with paragraphs in nested native Gutenberg blocks (in Groups and Columns), do always show, regardless of structure or order.
For posts with paragraphs in nested GenerateBlocks, the excerpts are not shown. An exception is a single paragraph in a single GB Container, but as soon as I add another element (e.g. an image) in the same GB Container, the excerpt is again not shown.
Also, if a single paragraph in a GB Container is nested in yet another GB Container, the excerpt is not shown. And an exception to this is if these GB Containers are placed in a native Gutenberg Column.See the images:
https://www.dropbox.com/s/qz43svi6pneo8it/no-excerpt.png
https://www.dropbox.com/s/u8cqrofn2mo5biu/yes-excerpt.pngThe “Display Post Types” plugin from vedahemes (in the WP plugins library) displays the excerpts in all structures without any problems! So there is a simple way to make (custom) post grids WITH excerpts.
Maybe you can take a look at this plugin and have some use for it.Markus
February 14, 2022 at 4:37 pm #2118765Tom
Lead DeveloperLead DeveloperI’ll have to look at how it’s working with the core blocks. The bug itself hasn’t been fixed in WordPress, yet: https://core.trac.wordpress.org/ticket/47637
I can see nested Group blocks are working, so we’ll try to deconstruct how they’re achieving that and apply it to GB.
Thanks!
February 14, 2022 at 4:49 pm #2118772Tom
Lead DeveloperLead DeveloperFound it, you can add this for now until we fix it in GenerateBlocks:
add_filter( 'excerpt_allowed_wrapper_blocks', function( $allowed ) { $allowed[] = 'generateblocks/container'; return $allowed; } );
February 15, 2022 at 2:03 am #2119088Markus
Tom, thank you for your fast reply and solution!
I added the GB grid element to your code and then it worked! I’m super happy.add_filter( 'excerpt_allowed_wrapper_blocks', function( $allowed ) { $allowed[] = 'generateblocks/container'; $allowed[] = 'generateblocks/grid'; return $allowed; } );
February 15, 2022 at 8:27 pm #2120453Tom
Lead DeveloperLead DeveloperGlad it’s working! 🙂
December 1, 2022 at 1:09 am #2444069Markus
Hello Tom and friends,
I still or again have to use this code with the GP query loop to show excerpts.
Is it just me, am I doing something wrong, or could it be because of GB?December 1, 2022 at 8:35 am #2444721David
StaffCustomer SupportHi there,
no that code should not be required today.
Can i see the site where you’re having the issue ? -
AuthorPosts
- You must be logged in to reply to this topic.