Plugin Elementor: How to make a text excerpt end arbitrarily?

In Elementor, the length of the text excerpt can be set, but not how this should end. e.g. with …

Solution: With the following code in functions.php this can be adjusted as desired.

function custom_post_excerpt_length($post_excerpt, $post)
//Maximum bush letters
$length = 70;
//Ends with ...
$excerpt = strlen($post_excerpt) > $length ? mb_substr($post_excerpt, 0, $length - 3, "utf-8") . "..." : $post_excerpt;
return $excerpt;
add_filter('get_the_excerpt', 'custom_post_excerpt_length', 20, 2);
Without cookies
This website does not use cookies or tracking. More information can be found in the privacy policy.