Skip to content

Instantly share code, notes, and snippets.

@fovoc
Created December 9, 2014 12:12
Show Gist options
  • Select an option

  • Save fovoc/e1dbad809ef7cc5daef2 to your computer and use it in GitHub Desktop.

Select an option

Save fovoc/e1dbad809ef7cc5daef2 to your computer and use it in GitHub Desktop.
Shoestrap 3 - custom layouts
<?php
function custom_layout() {
/* set conditionals */
if ( is_singular() ) {
global $ss_layout;
/* set layout */
$ss_layout->set_layout( 2 );
/* control main section classes */
add_filter( 'shoestrap_section_class_main', function(){ echo 'col-md-4';} );
/* control primary sidebar display and classes */
add_filter( 'shoestrap_display_primary_sidebar', '__return_true', 999 );
add_filter( 'shoestrap_section_class_primary', function(){ echo 'col-md-8';} );
/* control secondary sidebar display and classes */
add_filter( 'shoestrap_display_secondary_sidebar', '__return_false', 999 );
// add_filter( 'shoestrap_section_class_secondary', function(){ echo 'col-md-4';} );
}
}
add_action( 'wp', 'custom_layout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment