Same spirit as @mjhay, I’m trying to find a way, but no results with ECS.
I tried something like this in functions.php :
<pre><code>add_filter( 'get_the_excerpt', function( $excerpt, $post ) {
if ( has_excerpt( $post ) ) {
$excerpt_length = apply_filters( 'excerpt_length', 25 );
$excerpt_more = apply_filters( 'excerpt_more', ' ' . '[…]' );
$excerpt = wp_trim_words( $excerpt, $excerpt_length, $excerpt_more );
}
return $excerpt;
}, PHP_INT_MAX, 2 );
</code></pre>
It works with the standard ‘posts’ widget from Elementor, but not ECS loop.
I wonder if this lines in ele-custom-skin/skins/skin-custom.php would help :
// Add a custom skin for the POSTS widget
add_action( 'elementor/widget/posts/skins_init', function( $widget ) {
$widget->add_skin( new Skin_Posts_ECS( $widget ) );
} );
// Add a custom skin for the POST Archive widget
add_action( 'elementor/widget/archive-posts/skins_init', function( $widget ) {
$widget->add_skin( new Skin_Archive_ECS( $widget ) );
} );
-
This reply was modified 3 years, 3 months ago by
freuxdesbois.