Post Pic

How to: Add shortcodes in sidebar Widgets

You know it, I love shortcodes, and wrote about time some days ago. But a very frustrating thing is that you can’t add shortcode in sidebar Widgets. You can’t? yes, unless you read that recipe!

To allow shortcodes in sidebar widgets, simply edit the functions.php file from your them and add the following code:

add_filter('widget_text', 'do_shortcode');

Once you saved the file, you can now add as many shortcodes as you want in sidebar widgets.

Credits goes to English Mike for this awesome recipe!

14 Responses

Dec 18 2008 13:54

Another good one..

Thank you..

I love to read these tips.

Dec 18 2008 14:32

@Sarbjit Singh: Thanks! Glad you enjoy reading WpRecipes!

Dec 22 2008 13:51

Shortcodes makes things easy. Really.

Nov 28 2009 15:30

Don’t work in IE ?

Nov 28 2009 18:56

@Eduard : Who cares about IE anyways?

Dec 19 2009 01:53

This is awesome. Great help.

Trackbacks:

Leave a Comment

* Name, Email, Comment are Required