Last active
November 26, 2015 16:00
-
-
Save neilgee/e12d34c072fa0d167fac to your computer and use it in GitHub Desktop.
Full Width WooCommerce Pages in a Genesis Theme
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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