Hi. How can we help?

How to disable the vendor store page on frontend

If you want disable the vendor store page on frontend you can paste the followinjg code in functions.php of your theme:

 

/**
* Disable the taxonomy archive pages
*/
if( function_exists( 'YITH_Vendors' ) ){
add_action('pre_get_posts', 'yith_disable_vendor_tax_archive');
if( ! function_exists( 'yith_disable_vendor_tax_archive' ) ){
function yith_disable_vendor_tax_archive($qry) {
if ( ! is_admin() && is_product_taxonomy( YITH_Vendors()->get_taxonomy_name() )){
$qry->set_404();
}
}
}
}
Was this article helpful?
0 out of 0 found this helpful

Back to Help Center >

Powered by Zendesk