Created
June 29, 2017 08:34
-
-
Save SirDarcanos/44e1a207ebe3b5e78c4072bc38a5c69a to your computer and use it in GitHub Desktop.
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
<?php | |
/** | |
* Load a custom template for vendor taxonomy | |
*/ | |
function load_custom_vendor_template( $located, $template_name ) { | |
if( is_tax( WC_PRODUCT_VENDORS_TAXONOMY ) && 'archive-product.php' == $template_name ) { | |
return get_stylesheet_directory() . '/woocommerce/taxonomy-shop_vendor.php'; | |
} | |
return $located; | |
} | |
add_filter( 'wc_get_template', 'load_custom_vendor_template', 10, 2 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment