Shortcode in the text widget – in the sidebar.

In few my works i need use shortcode inner text widget. When you need add custom gallery or other shortcodes you can add this code in your functions.php:

<?php
/* Allow shortcodes in widget areas */
add_filter('widget_text', 'do_shortcode');
?>

Simple? Please share this post to your friends.

Leave a Reply

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