Hiding the Sidebar Widget HTML when There's no Widgets

With it you can check to see if there are widgets in a sidebar and if not, well, you can do something else. Like nothing for an example. Nothing, in this case, is really something.

With this, you hide the sidebar widget HTML (most likely empty tags) if you have no widgets set for it. I am currently looking for ways to hide the next/previous navigation HTML code when there’s no next/previous post: similar problem, might have similar solution as well.

You may also like...