how to wrap widgets inside a div, conditionally?
-
At the bottom of my theme, I want to have a widgetized region that is wrapped in a div called “footer-widgets”. But if there are no widgets activated, I don’t want an empty div to show up.
What I’m trying to accomplish is logic like this:
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Footer Widgets') ) : ?> <div id="footer-widgets"><!--widget stuff--></div> <?php endif; ?>
What would be the right way to do this? Thanks!
Viewing 10 replies - 1 through 10 (of 10 total)
Viewing 10 replies - 1 through 10 (of 10 total)
- The topic ‘how to wrap widgets inside a div, conditionally?’ is closed to new replies.