Don't display if empty?
-
Would it be possible to make it so that this widget does not display if it’s empty? This code works well and could possibly be incorporated: https://ww.wp.xz.cn/support/topic/hide-empty-widget#post-5400343
I need this for instances where I have a shortcode in a widget, which sometimes renders content and sometimes does not. For instance, a related posts shortcode that returns nothing when there are no related posts. In that case, I don’t want the empty widget-div’s adding padding in my sidebar.
Thanks in advance for considering it!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
The topic ‘Don't display if empty?’ is closed to new replies.