Fix for ‘featured product’ slider not working
-
If you’re using Woocommerce 3.x and your featured product slider isnt working, make the following changes:
Folder: /wp-content/plugins/storefront-homepage-extra-sections/sections
File: product-slider.phpFind this line of code:
$args = array( 'post_type' => 'product', 'posts_per_page' => $num_prod ,'meta_key' => '_featured', 'meta_value' => 'yes' );
Replace it with these lines of code:
$args = array( 'post_type' => 'product', 'posts_per_page' => $num_prod, 'tax_query' => array( array( 'taxonomy' => 'product_visibility', 'field' => 'name', 'terms' => 'featured', ), ), );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fix for ‘featured product’ slider not working’ is closed to new replies.