Simply pasting a shortcode into any of your widget areas generally won’t work.
To enable the use of shortcodes in any text widget area, on any theme, simply add this code to your child themes functions.php file.
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
This enables short codes in excerpts:
add_filter( 'the_excerpt', 'shortcode_unautop');
add_filter( 'the_excerpt', 'do_shortcode');
This enables use of short codes in your description field for archive pages
add_filter( 'term_description', 'shortcode_unautop');
add_filter( 'term_description', 'do_shortcode' );
This enables use of short codes in comments:
add_filter( 'comment_text', 'shortcode_unautop');
add_filter( 'comment_text', 'do_shortcode' );
Now all you need to do is paste your shortcodes and they will work.
Leave a Reply
You must be logged in to post a comment.