add_filter('widget_text', 'do_shortcode');
This will ensure that the text content of widgets is parsed for shortcodes and those shortcodes are ran.
You are here: » Home
How to add Shortcodes in Widgets, and wordpress text widgets
The Shortcode API Introduced in WordPress 2.5. Shortcode is a simple set of functions for creating macro codes for use in post/page content. You may seen that shortcodes can be used in wordpress posts, pages. but by deafult shortcodes cannot worked in widgets you need to enable it.
To add shortcodes in Widgets simply add the following code on your theme's functions.php
Subscribe to:
Post Comments (Atom)
Previous Article

Responses
0 Respones to "How to add Shortcodes in Widgets, and wordpress text widgets"
Post a Comment