Excerpts shown in full length

Hi there.
Just recently noticed that Astrid has no excerpt limit. I looked in the functions php and found the trigger there but since I don’t really understand what it does I am helpless.
I need to be able to put more text in the excerpt field than is being displayed.
Can you help me fix Astrid showing only a certain excerpt length?

Very much appreciated!
And also: THANK YOU for that great Theme. I really love it!

Hello there,

You can set your own excerpt length from Dashboard > Appearance > Customize > Blog options > Excerpt length.

Regards,
Kharis

Thanks again for your fast answer!
I played around with it. But there is some very interesting stuff happening. ie bug?
It seems that only those posts are effected by this number that have an auto generated excerpt!
The ones where I manually put thext in the excerpt field are not shortened.
Weird.

Hello there,

Try adding this snippet into a child theme’s functions. Or use Code Snippets plugin if you aren’t running any child theme.

    add_filter( 'the_excerpt', 'astrid_child_custom_excerpt', 99999 );
    function astrid_child_custom_excerpt( $excerpt ) {
    	
      $num_words = get_theme_mod('exc_length', '40');	
      $more = '[…]'; 	
      $excerpt = wp_trim_words( $excerpt, $num_words, $more );
      $output = $excerpt;
      return $output;	
      
    }

Regards,
Kharis