Force Genesis layout settings

You can force the layout settings used by the whole site or by a particular page.

Force layout settings across your site

If you want the layout settings to be used throughout your site, add the code snippet to the functions.php file. This would override layout settings across the site.

Force layout settings on specific pages

If you want to replace only the loop on a page, create a template and set the page to use the template.

For example, if I want to replace the loop on my Portfolio page, I create page-portfolio.php and select Portfolio as the template for the page.

Code snippets

Add the code snippets for the desired outcome.

Content-sidebar layout

Content on the left, sidebar section on the right.

[php title="content-sidebar"]
//* Force content-sidebar layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );

Sidebar-content layout

Sidebar on the left, content section on the right.

Content-sidebar-sidebar layout

Content section with two sidebar columns on its right.

[php title="content-sidebar-sidebar"]
//* Force content-sidebar-sidebar layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar_sidebar' );

Sidebar-sidebar-content layout

Two sidebar columns to the left of the content section.

[php title="sidebar-sidebar-content"]
//* Force sidebar-sidebar-content layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_sidebar_content' );

Sidebar-content-sidebar layout

The content sits between two sidebar columns.

[php title="sidebar-content-sidebar"]
//* Force sidebar-content-sidebar layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content_sidebar' );

Full-width-content layout

The content occupies the whole width, hence the name, of the page with no sidebar space.

[php title="full-widht-content"]
//* Force full-width-content layout setting
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

See also

You can also unregister Genesis layout settings or even remove them completely.