Advertisement
Guest User

Hide sidebar on mobile

a guest
Jan 16th, 2014
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. <?php
  2. /**
  3. * @package WordPress
  4. * @subpackage Fashionista WordPress Theme
  5. */
  6. ?>
  7. <?php wpex_hook_sidebar_before(); ?>
  8.  
  9. <?php $wpex_show_sidebar = 'true'; ?>
  10. <?php if( of_get_option( 'sidebar_layout' ) == 'none' && is_singular( ) ) $wpex_show_sidebar = 'false'; ?>
  11.  
  12. <?php if ( $wpex_show_sidebar == 'true' ) { ?>
  13. <?php if ( wp_is_mobile() && of_get_option('sidebar_responsive') == '1' ) {
  14. // Do nothing on mobile devices
  15. } else { ?>
  16. <div id="sidebar" class=" container <?php if(of_get_option('sidebar_responsive','') !='1') { echo 'hide-mobile-portrait hide-mobile-landscape'; } ?>">
  17. <?php wpex_hook_sidebar_top(); ?>
  18. <?php dynamic_sidebar('sidebar'); ?>
  19. <?php wpex_hook_sidebar_bottom(); ?>
  20. </div>
  21. <!-- /sidebar -->
  22. <?php } ?>
  23. <?php } ?>
  24. <?php wpex_hook_sidebar_after(); ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement