Enabling shortcodes in WordPress excerpts aren’t automatic, but here’s the override

To enable shortcodes in WordPress excerpts you have to add this to your active theme’s (hopefully a child theme) functions.php file:

add_filter( 'the_excerpt', 'shortcode_unautop');
add_filter( 'the_excerpt', 'do_shortcode');
Leave a Reply 0

Your email address will not be published. Required fields are marked *