Skip to content

Instantly share code, notes, and snippets.

@kovshenin
Created August 5, 2011 06:52
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kovshenin/e8e379d3a26bf923a1ba to your computer and use it in GitHub Desktop.
Save kovshenin/e8e379d3a26bf923a1ba to your computer and use it in GitHub Desktop.
Twenty Eleven Child Theme (Layouts)
<?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;
}
.three-column {
/* styles go here */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment