Created
August 5, 2015 07:33
-
-
Save blogjunkie/2a3a14977e4df483d561 to your computer and use it in GitHub Desktop.
Make WooCommerce product archive obey shop page layout settings
This file contains hidden or 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
/** | |
* Make WooCommerce product archive obey shop page layout settings | |
*/ | |
add_filter( 'genesis_pre_get_option_site_layout', 'vh_do_shop_layout' ); | |
function vh_do_shop_layout( $opt ) { | |
if ( is_post_type_archive('product') ) { | |
$opt = get_post_meta( wc_get_page_id('shop'), '_genesis_layout', true); | |
return $opt; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment