Skip to content

Instantly share code, notes, and snippets.

@blogjunkie
Created August 5, 2015 07:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save blogjunkie/2a3a14977e4df483d561 to your computer and use it in GitHub Desktop.
Save blogjunkie/2a3a14977e4df483d561 to your computer and use it in GitHub Desktop.
Make WooCommerce product archive obey shop page layout settings
/**
* 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