-
-
Save kovshenin/e8e379d3a26bf923a1ba to your computer and use it in GitHub Desktop.
Twenty Eleven Child Theme (Layouts)
This file contains 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 | |
add_filter( 'twentyeleven_layouts', 'my_twentyeleven_layouts' ); | |
add_filter( 'twentyeleven_layout_classes', 'my_twentyeleven_layout_classes', 10, 2 ); | |
function my_twentyeleven_layouts( $layouts ) { | |
$layouts['sidebar-content-sidebar'] = array( | |
'value' => 'sidebar-content-sidebar', | |
'label' => __( 'Two sidebars, content in the middle', 'twentyeleven' ), | |
'thumbnail' => get_template_directory_uri() . '/inc/images/sidebar-content.png', | |
); | |
return $layouts; | |
} | |
function my_twentyeleven_layout_classes( $classes, $current_layout ) { | |
if ( 'sidebar-content-sidebar' == $current_layout ) | |
return array( 'three-column', 'sidebar-content-sidebar' ); | |
return $classes; | |
} |
This file contains 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
.three-column { | |
/* styles go here */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment