Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Responsive theme sidebar change

By: a guest on Dec 25th, 2012  |  syntax: None  |  size: 0.57 KB  |  views: 49  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Replace:
  2.  
  3.  
  4.         <?php if (!dynamic_sidebar('main-sidebar')) : ?>
  5.         <div class="widget-wrapper">
  6.                 <div class="widget-title"><?php _e('In Archive', 'responsive'); ?></div>
  7.                 <ul>
  8.                         <?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
  9.                 </ul>
  10.         </div><!-- end of .widget-wrapper -->
  11.         <?php endif; //end of main-sidebar ?>
  12.  
  13.  
  14. with
  15.  
  16.         <?php if ( is_active_sidebar( 'main-sidebar' ) ) : ?>
  17.                 <?php dynamic_sidebar( 'main-sidebar' ); ?>
  18.         <?php endif; //end of main-sidebar ?>
  19.  
  20. That way, the widget background only show up when there's content or if a widget was added.