
Responsive theme sidebar change
By: a guest on
Dec 25th, 2012 | syntax:
None | size: 0.57 KB | hits: 32 | expires: Never
Replace:
<?php if (!dynamic_sidebar('main-sidebar')) : ?>
<div class="widget-wrapper">
<div class="widget-title"><?php _e('In Archive', 'responsive'); ?></div>
<ul>
<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
</ul>
</div><!-- end of .widget-wrapper -->
<?php endif; //end of main-sidebar ?>
with
<?php if ( is_active_sidebar( 'main-sidebar' ) ) : ?>
<?php dynamic_sidebar( 'main-sidebar' ); ?>
<?php endif; //end of main-sidebar ?>
That way, the widget background only show up when there's content or if a widget was added.