Vendor Listing by Location

Solution provided by Randall – http://www.wcvendors.com/help/topic/sort-vendor-by-shop-setting-field/ Overall, here is the concept. I needed a shortcode that would allow me to separate vendors by location. To do this, I required users to select a location during their registration and in their store settings. Then I pulled that meta info into a shortcode which filtered and displayed … Read more

Target pages using Woo Commerce single product page template

You can use is_product() WooCommerce conditional tag to identify if its single product page. Below is example code which enqueues test.js if its a single product page. You may use and tweak this code snippet further. function mytheme_scripts() { if ( is_product() ) { wp_enqueue_script( ‘test-js’, get_template_directory_uri() . ‘/js/test.js’, array() ); } } add_action( ‘wp_enqueue_scripts’, … Read more

Using the same WP_Query for shop and widgets in WooCommerce shop

The reasons your pre_get_posts filter does not work on the widget are the condition !$wp_query->is_main_query() makes the filter handle only the main query and nothing else Your special parameter myattr is “self populating” only on the main query but it is not propagating automatically to other queries. To make it work on the widget, the … Read more

WordPress Theme Conflict With Plugin

I found the solution on the problem with Downgrading the Woocommerce based on the Theme Woocommerce. The steps would be: Deactivate the Current Woocommerce Plugin Using FTP or File Manager delete the content of the folder “woocommerce” Download the Older Version of Woocommerce Unzip and Upload using FTP Activate again the Plugin