Enable Shortcode in Widget


Sponsored Links




There are simple ways to Enable Shortcode in Widget Area. Using WordPress, there are almost unlimited possibilities, one nice featured that you should learn and uses is Shortcode. With WordPress shortcode, WordPress content writer will be more easier to put some extra ordinary content into WordPress website.

Enable Shortcode on Widget - WordPress Needle Cushion Logo

Enable Shortcode on Widget - WordPress Needle Cushion Logo

Right now, I will show you tiny trick to Enable Shortoce on Widget in your Theme. To use this features, your theme must widget support. After you understand that your theme widget support.

Open your functions.php and put on this code

add_filter('widget_text','do_shortcode');

That’s it, add_filter will be filter your text widget. So, when you put some shortcode (example [ gallery ] in your text widget. The code will be processed by WordPress system. Another useful source about shortcode here

Photos courtesy from http://www.flickr.com/photos/odysseygate/4011227987/in/photostream/

Subscribe to Full RSS Feed

RSS FeedIf you thing this article useful, please consider subscribing to our RSS Feed or e-mail updates and stay updated with us. You can also follow @WPTricksNet on twitter for latest updates.

About WP Tricks

We are WordPress Family, we collected and writed useful tips and tricks for you WordPress. We share it for you...

Related Tips and Trick from Local Data and on The Net


2 Responses to Enable Shortcode in Widget

  1. Pingback: Tweets that mention How To Enable Shortcode in Widget # WordPress Tricks & Tips -- Topsy.com

  2. chris says:

    thanks a lot for that tip! even though it’s “only” a simple function call it was driving me insane because i couldn’t find out why my shortcodes would not work within a sidebar while working perfectly within pages or posts.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>