Last active
January 19, 2021 12:16
-
-
Save corsonr/3ac30cc334cf344dbb3b to your computer and use it in GitHub Desktop.
WooCommerce: change related products image size
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 | |
add_filter( 'wp_head' , 'related_products_style' ); | |
function related_products_style() { | |
if( is_product() ) : | |
?> | |
<style> | |
.woocommerce .related ul.products li.product, .woocommerce .related ul li.product, .woocommerce .upsells.products ul.products li.product, .woocommerce .upsells.products ul li.product, .woocommerce-page .related ul.products li.product, .woocommerce-page .related ul li.product, .woocommerce-page .upsells.products ul.products li.product, .woocommerce-page .upsells.products ul li.product { | |
width: 24% !important; | |
} | |
</style> | |
<?php | |
endif; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there. I am having issue with the related products image sizing... some of the products shown under related products slider are very bigger in size and some shown normal. this destruct the site overall look very badly. Any idea how to fix it.
