Are you using the plugin WooCommerce Product Vendors?
Well, I think you will love this tutorial then!
If you are one of those users who want to setup a custom vendor shop page, add this code in your functions.php file located in wp-content/themes/your-theme-name/:
<?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 ); |
Latest Comments