Skip to content

Instantly share code, notes, and snippets.

@grantambrose
Last active August 31, 2016 22:41
Show Gist options
  • Save grantambrose/97723ad47a189fb99ff9eb50f49ca184 to your computer and use it in GitHub Desktop.
Save grantambrose/97723ad47a189fb99ff9eb50f49ca184 to your computer and use it in GitHub Desktop.
Disable the Blog Sidebar ONLY on Single Posts
<?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'); ?>
/** 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 //FLTheme::sidebar('left'); ?>
<div class="fl-content col-sm-12">
<?php if(have_posts()) : while(have_posts()) : the_post(); ?>
<?php get_template_part('content', 'single'); ?>
<?php endwhile; endif; ?>
</div>
<?php //FLTheme::sidebar('right'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment