Tagged: x
-
AuthorPosts
-
May 26, 2016 at 9:35 am #1011134
tahaabbasiParticipantHello,
I am having a problem trying to change the crop ratio of product thumbnail images. I have used this code:
add_action( 'init', 'x_image_set_settings', 99 ); function x_image_set_settings () { remove_filter( 'woocommerce_product_settings', 'x_woocommerce_remove_plugin_settings', 10 ); }To enable the image crop settings in WooCommerce, over there I have changed the image ratio for Product Thumbnails to 0.78 as my images are not square.
After this I regenerated the images for one product to test:
but As you can see here on my product page, the thumbnail images are still square and are still cropped. Any suggestions on how to fix this? I need my thumbnails to be 0.78 ratio not 1:1
May 26, 2016 at 10:58 am #1011290
RupokMemberWould you mind providing us with login credentials so we can take a closer look? To do this, you can make a post with the following info:
– Link to your site
– WordPress Admin username / password
– FTP credentialsDon’t forget to select Set as private reply. This ensures your information is only visible to our staff.
May 26, 2016 at 3:10 pm #1011703
tahaabbasiParticipantThis reply has been marked as private.May 26, 2016 at 9:15 pm #1012221
Rue NelModeratorHello there,
By default in X, the product image displaying as thumbnail is not the thumbnail sizes which you have set in the WooCommerce. So that the thumbnail images size will display, you must add this custom function code in your child theme’s functions.php file
add_filter('single_product_small_thumbnail_size', function() { return 'shop_thumbnail_image_size'; }, 100 );Please make sure that you already set the image dimension of the thumbnails and that you already have regenerated the thumbnails. And Since you have installed a caching plugin SG CachePress and WordFence, please clear your plugin cache before testing your site. This can cause the changes to not take place on the front end. It will eventually show up when the cache regenerates, but it’s not ideal if you’re looking to see your changes immediately. Caching plugins are best to turn on only when you’ve finished building the site.
Please let us know how it goes.
May 26, 2016 at 9:49 pm #1012273
tahaabbasiParticipantIt worked! thank you so much!
May 26, 2016 at 11:11 pm #1012364
Prasant RaiModeratorYou are most welcome. 🙂
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1011134 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
