313: How can I use shortcodes within a WordPress Text widget?
By default, WordPress shortcodes do not work within Text widgets. If you need this functionality, it is quite easy to accomplish, simply follow the steps below.
- Log into your WordPress Dashboard
- Under "Appearance" click "Editor"
- In the list of files on the right of the page, click "functions.php"
- At the bottom of the functions.php file, add the following code:
add_filter( 'widget_text', 'shortcode_unautop');
add_filter( 'widget_text', 'do_shortcode');
Click "Update File" and your shortcodes should now work in your Text widgets!
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
2013-09-06 6:49 am
its awesome man!
thanks a lot man
its working awesomely
Post a Comment
Do you want to publish a tutorial to our support center?