Reputation: 301
I used the following code in my functions.php file.
function cutOffDate() {
return 'December 15, 2013';
}
add_shortcode('cutOff', 'cutOffDate');
When I add the shortcode to a page or post, it works fine. But if I add the shortcode to text in a widget, all I get is "[cutoff]".
Can someone please point me in the right direction for solving this? I know it's a nooob question (I'm a noob), but I have no clue where to even begin to look for a solution other than here. Thanks for your help!
Upvotes: 0
Views: 79
Reputation: 10061
Write this following line in functions.php
add_filter('widget_text', 'do_shortcode');
Upvotes: 0