Last active
October 13, 2016 14:56
-
-
Save bentasm1/664894f93016becdc5bf to your computer and use it in GitHub Desktop.
For archive-product.php and specific vendor info
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 | |
/* This goes somewhere in your archive-product.php template. This will check if the URL they are on is a vendor store, | |
* and if it is, do something, if it isn't, do something else. Writhing the somethings is up to you. :) | |
*/ | |
$vendor_shop = urldecode( get_query_var( 'vendor_shop' ) ); | |
$vendor_id = WCV_Vendors::get_vendor_id( $vendor_shop ); | |
if ( $vendor_id ) { | |
// Do something | |
} elseif { | |
// Do something else | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment