Created
December 9, 2014 12:12
-
-
Save fovoc/e1dbad809ef7cc5daef2 to your computer and use it in GitHub Desktop.
Shoestrap 3 - custom layouts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?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