You installed a plugin and then you try to use the shortcode on your sidebar. It does not show up, what do you do? Well here is a series of short codes that you will add to your functions.php file.
By adding the following short codes you will be able to execute scripts from plugins anywhere in your WordPress CMS.
Enable Short Codes in Sidebars and Text Widgets *
add_filter( 'widget_text', 'shortcode_unautop'); add_filter( 'widget_text', 'do_shortcode');
Enable Short Codes in template Files *
<?php do_shortcode('[foo]'); ?>
Enable Short Codes in Comments *
add_filter( 'comment_text', 'shortcode_unautop'); add_filter( 'comment_text', 'do_shortcode' );
Enable Short Codes in Categories, tags and Archive Pages *
add_filter( 'term_description', 'shortcode_unautop'); add_filter( 'term_description', 'do_shortcode' );
These codes will help you use shortcodes everywhere in WordPress. Because of security measures WordPress disables many of them by default.
I hope you enjoyed the article. If I was able to help you please consider a tip for the content.
One Time Tip