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 | |
/** | |
* 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