Removing woodmart_swatches_list(); from archives
-
Hi,
We want to remove swatches list php request from archives as it takes ages to load products with a lot of variations.
We did manage to remove the woodmart_swatches_list();
from archives (shop, category page and etc), as when we have on average 30 variations per product for 50 products, the query takes ages. However, after updating to 3.5.2 woodmart version the queries blasted again and we can’t find what we are missing.
We removed it from these files http://prntscr.com/mr0fms in /child-theme/woocommerce/ .
Here are the query count for the same page and plugins for woodmart http://prntscr.com/mr0hur and shopkeeper http://prntscr.com/mr0gno
What are we missing?
Hi,
You can disable attribute to be displayed on the shop page via Theme Settings -> Shop -> Attribute swatches.
Regards
We understand that, but on variable products, on product page we need the theme to take the product image for color (spalva) image directly uploaded to variable product.
when we disable on settings >attribute swatches the image is not taken on the product page.
therefore we just need to eliminate the code from products loops everywhere.
how to do that?
Try to add the following PHP code snippet to the child theme functions.php file to do this
function woodmart_swatches_list( $attribute_name = false ) {}
The topic ‘Removing woodmart_swatches_list(); from archives’ is closed to new replies.