Created
October 16, 2014 07:33
-
-
Save palimadra/914f759ae967e856d9d2 to your computer and use it in GitHub Desktop.
functions.php for wordpress
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 ) { | |
global $wc_product_vendors; | |
if( is_tax( $wc_product_vendors->token ) ) { | |
return get_template_directory() . '/woocommerce/taxonomy-shop_vendor.php'; // Change here the file name if needed | |
} | |
return $located; | |
} | |
add_filter( 'wc_get_template', 'load_custom_vendor_template' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment