Skip to content
Karin Taliga edited this page May 6, 2014 · 3 revisions

The available layouts that come with Thematic are Right Sidebar, Left Sidebar, Three columns and Full Width. On the full width layout, the sidebar is removed and the content spans the whole page width. There is also a page template for using the Full Width layout on specific pages. The slugs for the default available layouts are right-sidebar, left-sidebar, three-columns and full-width.

Child themes can easily remove or add layouts using the filter thematic_available_theme_layouts. Using this filter will make the extra child theme layout appear in the Theme Customizer as well as apply the appropriate body class when the layout is selected. The actual css for any additional layouts to happen is up to the child theme to add to its stylesheet.

function mychild_alter_layouts( $available_layouts ) {
		
	// this will remove a layout from being available
	unset( $available_layouts['three-columns'] );
	
	// this will add a layout to the available layouts
	// the slug is the body class that will be applied
	// the title is what will be shown next to the radio box in the Theme Customizer
	$available_layouts['half-sidebar'] = array(
		'slug' => 'half-sidebar',
		'title' => __( 'Half Sidebar', 'mychild-textdomain')
	);
		
	return $available_layouts;
}
add_filter( 'thematic_available_theme_layouts', 'mychild_alter_layouts' );

Using this filter affects all of the layout determining functions and filters demonstrated on the theme layout page. If any string returned by thematic_default_theme_layout or thematic_current_theme_layout is not found among the available layouts, it will be ignored.

Clone this wiki locally