Hi, Waiting has its own widget, use that. What are you using now?
Thread Starter
JJ
(@jimmyj352)
Haha, I never even knew the widget was there – I’ve been doing a text widget with the shortcode in it for a while now. 🙂
I just tried the Waiting widget and it shows up blank on the page. I also tried switching the theme and that didn’t make a difference.
I left the widget on the page since it showing up blank doesn’t hurt anything.
If I do an Inspect Element, it looks like the widget is there, but it’s blank in between the span tags.
Any thoughts?
Hi, no, the shortcode isn’t there. Make sure you have countdown created in Waiting page and Waiting widget active with one countdown selected.
Thread Starter
JJ
(@jimmyj352)
Well, I fixed it. I tested the shortcode in a page and it showed up just fine. For some reason it just stopped working in widgets. Then I found this article:
https://www.smashingmagazine.com/2012/05/wordpress-shortcodes-complete-guide/
It had this blurb in it:
A shortcode in a widget before enabling the functionality
With WordPress, we can enable this functionality with a single line of code. To be able to add shortcodes in widgets, add the following:
add_filter(‘widget_text’, ‘do_shortcode’);
I added that to the functions.php in my child theme and everything worked just fine again. No idea why that would have stopped working, but hopefully this helps someone else out if they run into the same issue.
Thanks for your help!
— Jim
-
This reply was modified 9 years, 5 months ago by
JJ.