Shortcodes in Text Widgets Broken
-
I don’t know when this actually happened, but I only noticed it yesterday. I had shortcodes in several text widgets that stopped resolving so they actually displayed the shortcodes.
I’ve been able to fix it by adding a do_shortcode filter in my functions.php file, but I wanted to report it in case others are having the same problem. Unfortunately, at first I thought it might be a plugin conflict so I deactivated all of mine, which caused me to lose a boatload of widgets that will take me quite a while to recreate, so I don’t want others to go through the same problem.
Also, if it is an error in the core code and gets fixed, I don’t know if adding the filter myself will cause problems.
This is the code I added to functions.php:
add_filter('widget_text', 'do_shortcode');
- The topic ‘Shortcodes in Text Widgets Broken’ is closed to new replies.