Skip to content

Instantly share code, notes, and snippets.

@wpspeak
Forked from christophercochran/Genesis Layout Logic
Last active December 21, 2015 16:59
Show Gist options
  • Save wpspeak/6337066 to your computer and use it in GitHub Desktop.
Save wpspeak/6337066 to your computer and use it in GitHub Desktop.
Conditionally force layout in Genesis Framework
<?php
/**
* Conditionally force layout in Genesis Framework
*/
function cc_layout_logic() {
/**
* Genesis layout helper functions.
* __genesis_return_content_sidebar
* __genesis_return_sidebar_content
* __genesis_return_content_sidebar_sidebar
* __genesis_return_sidebar_sidebar_content
* __genesis_return_sidebar_content_sidebar
* __genesis_return_full_width_content
*/
if ( is_home() || is_archive() )
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content');
}
add_action( 'get_header', 'cc_layout_logic');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment