Run Shortcode in WordPress Excerpts

Add this to your functions.php or your plugin.

add_filter( 'get_the_excerpt', 'shortcode_unautop');
add_filter( 'get_the_excerpt', 'do_shortcode');
add_filter( 'get_the_excerpt', 'do_shortcode', 5 );

Leave a Reply

Your email address will not be published.