Support » Theme: Bizzboss » Suggestion: hide sidebar when no widgets are active

  • At this moment when the main sidebar has no active widgets the div is still there and the single-post and blog page still have an empty space on the position of the sidebar.

    With a simple change the content on those pages could go full-width.

    this would be sufficient:

    content.php

    
    <?php get_sidebar();
            
            if (is_active_sidebar('sidebar-1')) { 
    	        echo'<div class="col-md-9 col-sm-8 col-xs-12">';
    	    } else { 
    	    	echo'<div class="col-md-12 col-sm-12 col-xs-12">';
    		}
    		?> 
    

    sidebar.php

    
    if (is_active_sidebar('sidebar-1')) {
    ?>
    	
    <div class="col-md-3 col-sm-4 col-xs-12 main-sidebar filter_category">
    	<?php dynamic_sidebar('sidebar-1'); ?>
    </div>
    
    <?php
    }
    
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Suggestion: hide sidebar when no widgets are active’ is closed to new replies.