Von b_funke |

Folgende Funktionen unten in der functions.php des Themes hinzufügen

add_filter(
    'register_block_type_args',
    'blockera_replace_excerpt_block_render_callback',
    10,
    2
);

/**
* Replace the render callback for core/post-excerpt block.
*
* @param array $args The block type arguments.
* @param string $block_type The block type name.
* @return array
*/
function blockera_replace_excerpt_block_render_callback($args, $block_type): array {
    if ( 'core/post-excerpt' === $block_type ) {
        $args['render_callback'] = 'blockera_render_block_core_post_excerpt';
    }

    return $args;
}

/**
* Custom render callback for post-excerpt block.
*
* @param array    $attributes Block attributes.
* @param string   $content    Block content.
* @param WP_Block $block      Block instance.
* @return string Rendered block output.
*/
function blockera_render_block_core_post_excerpt( $attributes, $content, $block ) {
    $attributes['excerptLength'] = null;

    return render_block_core_post_excerpt( $attributes, $content, $block );
}