3 added 600 characters in body
source | link

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;
}

try this

add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );

or try this edit

echo strip_shortcodes( get_the_excerpt() );

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;
}
2 added 78 characters in body
source | link

try this

add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );

or try this edit

echo strip_shortcodes( get_the_excerpt() );

try this

add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );

try this

add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );

or try this edit

echo strip_shortcodes( get_the_excerpt() );
1
source | link

try this

add_filter( 'get_the_excerpt', 'strip_shortcodes', 20 );