Lego2012
2/1/2017 - 7:33 PM

Disable the Blog Sidebar ONLY on Single Posts

Disable the Blog Sidebar ONLY on Single Posts

<?php

/** Force full width layout on single posts only */
add_filter( 'genesis_pre_get_option_site_layout', 'bb_full_width_layout_single_posts' );
function bb_full_width_layout_single_posts( $opt ) {
if ( is_single() ) {
    $opt = 'full-width-content'; 
    return $opt;
    } 
}
/** Force full width layout on single posts only */
add_filter( 'genesis_pre_get_option_site_layout', 'bb_full_width_layout_single_posts' );
function bb_full_width_layout_single_posts( $opt ) {
if ( is_single() ) {
    $opt = 'full-width-content'; 
    return $opt;
    } 
}
<?php

<?php FLTheme::sidebar('left'); ?>
		
	<div class="fl-content <?php FLTheme::content_class(); ?>">
		<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
			<?php get_template_part('content', 'single'); ?>
		<?php endwhile; endif; ?>
	</div>

<?php FLTheme::sidebar('right'); ?>