secret
Created

Twenty Eleven Child Theme (Layouts)

  • Download Gist
functions.php
PHP
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
<?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;
}
style.css
CSS
1 2 3
.three-column {
/* styles go here */
}

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.