Generating excerpts from a custom post type to display in a Widget

SOLVED

Use this code in the function.php file

function custom_field_excerpt() {
global $post;
$text = get_field('description'); //Replace 'your_field_name'
if ( '' != $text ) {
    $text = strip_shortcodes( $text );
    $text = apply_filters('the_content', $text);
    $text = str_replace(']]>', ']]>', $text);
    $excerpt_length = 20; // 20 words
    $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]');
    $text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
}
return apply_filters('the_excerpt', $text);
}

Then call the function in a custom WP_query using all post types in the header and call wp_reset_postdata(); when you’re done instead of using a widget!