Force a layout in a template

Here’s a code snippet you can use when you want to lock down a layout for a specific template. Just drop the following into a single-posttype.php, template-something.php, etc before the genesis() function:

add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

Note: __genesis_return_full_width_content is a helper function built into Genesis. See the end of this post on all available helper functions: Overriding Options and Meta.

Alternate method from Brad in the comments below which can go in functions.php:

/** Force full width layout */
add_filter( 'genesis_pre_get_option_site_layout', 'child_do_layout' );
function child_do_layout( $opt ) {
	if ( is_single() ) { // Modify the conditions to apply the layout to here
		$opt = 'full-width-content'; // You can change this to any Genesis layout
		return $opt;

As a reminder, Genesis comes with 6 default layouts:


See Brian Gardner’s post on creating a landing page in Genesis for a practical example of how you would use this.

Updated: 17 June 2013


    • says

      Hi Brad, thanks for sharing that! We should point out that your code goes into functions.php and affects the site globally. I should have been clearer that I wanted to target a specific template. For example, you could put the code in a Page Template for a sales page

  1. Pankaj says

    Thank you so much for this post. Glad to find this

    I am very new to genesis.

    what I did is

    “/** Force full width layout */
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘sidebar_layout’ );
    function sidebar_layout( $sbl ) {
    if(is_front_page()) // I wanted full page layout on home page and others with sidebar
    //This is for Home Page;
    else {
    $sbl = 'content-sidebar'; // You can change this to any Genesis layout
    return $sbl;

    I hope I am walking on right path

  2. Patty says

    Thank you! I found the force-layout code in a bunch of other places, but nobody else explained how to apply it to just one type of theme template, such as only single-post screens. I really appreciate it!

  3. ravi says

    I am following you..
    but i have apply add_filter in ‘single-parentsChild.php’
    and other function in function.php but there in no effect any of View side.

    Thank You

    • says

      Hi Ravi, `single-parentsChild.php` is the template for a custom post type. Are you sure “parentsChild” is the post type name? It should be the same as the one registered in `register_post_type( ‘post_type’, $args );`

  4. Henri says

    Thanks for your information. I tried it. But I need more the other way around. I have a 1200px widte genesis page and I want to force the salespage to 900px. After 3 days now I am a bit hopeless…
    Do you have the solution?