Shortcodes showing in excerpt despite using strip_shortcodes

On my website, shortcodes are showing in the excerpts, despite the fact that wordpress should remove them automatically, and that I tried this two different solutions :

function remove_shortcode_from_excerpt($content) {
$content = strip_shortcodes( $content );
return $content;
add_filter('the_excerpt', 'remove_shortcode_from_excerpt');


add_filter( 'the_excerpt', 'shortcode_unautop');
add_filter( 'the_excerpt', 'do_shortcode');

That I added in the functions.php file of my child theme.

What are my next options ?

Solutions Collecting From Web of "Shortcodes showing in excerpt despite using strip_shortcodes"

So, as iguanarama pointed out, the first step is to make sure that the theme you are using uses the_excerpt() to show the excerpt.

You’ll want to go check in your archive.php file how it is displayed. In my theme it was using the file 'template-parts/content-front-c.php'. Then go to this file and see what is the function displaying the excerpt. Right after the function gets the content, add $content=strip_shortcodes($content);, and, in my case, it worked !