[Resolved] Excerpt not showing on all blog posts

Home Forums Support [Resolved] Excerpt not showing on all blog posts

Home Forums Support Excerpt not showing on all blog posts

Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • #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,
    Ole

    #806705
    Tom
    Lead Developer
    Lead Developer

    Hi 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?

    #806765
    Ole

    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.

    #806788
    Leo
    Staff
    Customer Support

    It’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.

    #807060
    Ole

    Thanks for the great help. I have contacted Kadence.

    #807454
    Tom
    Lead Developer
    Lead Developer

    No problem 🙂

    #1635491
    piotr

    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 advance

    #1635508
    David
    Staff
    Customer Support

    Hi 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.

    #2117823
    Markus

    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.png

    The “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

    #2118765
    Tom
    Lead Developer
    Lead Developer

    I’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!

    #2118772
    Tom
    Lead Developer
    Lead Developer

    Found 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;
    } );
    #2119088
    Markus

    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;
    } );
    #2120453
    Tom
    Lead Developer
    Lead Developer

    Glad it’s working! 🙂

    #2444069
    Markus

    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?

    #2444721
    David
    Staff
    Customer Support

    Hi there,

    no that code should not be required today.
    Can i see the site where you’re having the issue ?

Viewing 15 posts - 1 through 15 (of 21 total)
  • You must be logged in to reply to this topic.