Skip to content

Instantly share code, notes, and snippets.

@neilgee
Last active November 26, 2015 16:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save neilgee/e12d34c072fa0d167fac to your computer and use it in GitHub Desktop.
Save neilgee/e12d34c072fa0d167fac to your computer and use it in GitHub Desktop.
Full Width WooCommerce Pages in a Genesis Theme
<?php
//do not copy above opening php tag when pasting into a functions.php file
//Full Width Pages on WooCommerce
function themeprefix_cpt_layout() {
if( is_page ( array( 'cart', 'checkout' )) || is_shop() || 'product' == get_post_type() ) {
return 'content-sidebar';
}
}
add_filter( 'genesis_site_layout', 'themeprefix_cpt_layout' );
<?php
//do not copy above opening php tag when pasting into a functions.php file
//Full Width Pages on WooCommerce
function themeprefix_cpt_layout() {
if( is_page ( array( 'cart', 'checkout' )) || is_shop() || 'product' == get_post_type() ) {
return 'full-width-content';
}
}
add_filter( 'genesis_site_layout', 'themeprefix_cpt_layout' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment