try this
add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );
or try this edit
echo strip_shortcodes( get_the_excerpt() );
if shortcode is not register with wordpress function add_shortcode
add_filter( 'the_excerpt', 'remove_shortcodes_in_excerpt', 20 );
function remove_shortcodes_in_excerpt( $content){
$content = strip_shortcodes($content);
$tagnames = array('box', 'alert'); // add shortcode tag name [box]content[/box] tagname = box
$content = do_shortcodes_in_html_tags( $content, true, $tagnames );
$pattern = get_shortcode_regex( $tagnames );
$content = preg_replace_callback( "/$pattern/", 'strip_shortcode_tag', $content );
return $content;
}
the_excerpt()
is called, it displays the shortcode directly as plain text (since the new theme doesn't support the parsing of the shortcode).