Hide widget title in sidebar if widget is empty

Posted in: Newspaper
Post count: 101

Hi,

I have created a sidebar which contains four widgets: “score”, “Camera eye”, “Info” and “Verwant” (related posts).

Someties one of these widgets don’t have any content in them. I have managed to hide the widget spacing if it is empty, however the title keeps appearing.
Which is kind of dumb to show a title when there is no content below it.

So, we would like to hide the <h4> title in widgets only, if said widget is empty.

How would we best do this ?

I’ve added an image below for clarification.

When every widget has content:

When one camera eye widget is empty and should be shown without title

Ideal solution:

Post count: 20685

Hi,

Maybe try with a plugin that extends the widget capabilities
https://wordpress.org/plugins/widget-options/
https://wordpress.org/plugins/widget-logic/
I haven’t tested these myself, maybe one of them can do this.

Thanks

Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.