Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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