Tagged: category, shop, size, thumbnails, wrong
-
AuthorPosts
-
November 2, 2022 at 4:47 am #1371011
Hi, I recently added some new products to a shop and on the category pages, the images are suddenly more square, even though I have set them to a custom size. The previously loaded images are fine – just the new ones are wrong so the on-page display looks bad. I think it happened after an Enfold update some weeks ago. Page link illustrating this in private content below – scroll down to lower products to see wrong size image. Also a link to a new Christmas category where all images are the wrong square size. Using latest version of Enfold and WordPress. I can supply log-in if needed. Thanks, Anne
November 3, 2022 at 4:42 am #1371178Hey Anne,
Thank you for the inquiry.
You can add this code in the functions.php file to adjust or replace the default thumbnail used in the shop catalogue.
add_filter( 'avf_wc_before_shop_loop_item_title_img_size', 'avf_wc_before_shop_loop_item_title_img_size_mod', 10, 1 ); function avf_wc_before_shop_loop_item_title_img_size_mod( $thumbnail_size ) { return 'woocommerce_thumbnail'; }
Please make sure to purge the cache and do a hard refresh after adding the filter.
Best regards,
IsmaelNovember 3, 2022 at 4:46 am #1371179Hi, thanks but I am not using a child theme and would have to keep updating that code? I don’t as a rule get into adding php code as I’m not confident with it.
Not sure why the sudden change – all was fine before. It will probably affect 3 shops I manage which is quite worrying. Is there not going to be a fix for this? I can send a log in if you need to look further.
Thanks – always appreciate your help, Anne.November 3, 2022 at 9:54 am #1371190Hi Anne,
You can add the code by using this plugin: WPCode – Insert Headers and Footers + Custom Code Snippets – WordPress Code Manager if you don’t want to use a child theme. Also, we can help you with adding the code.
Best regards,
NikkoNovember 12, 2022 at 2:58 pm #1372301Hi, I’m having the exact same problem. Just added the code you mentioned but that’s not giving any result.
is there another solution?
Best Regards,
HajéNovember 12, 2022 at 6:05 pm #1372314Hi Hajé,
Please open a new thread and include WordPress admin login details in private, so that we can have a closer look at your site.
Best regards,
RikardNovember 14, 2022 at 7:10 am #1372470Hi, sorry for the delay – my last reply did not send!
So I installed the plug-in and added the code snippet – just wondering if you can please tell me what location to select? Any other settings I need to konw – I’m new to this. And I assume its set as an HTML snippet?
Thanks, AnneNovember 16, 2022 at 12:55 pm #1372753November 17, 2022 at 3:02 am #1372874Thank you very much – that works perfectly. I’ve fixed 2 website’s displays already.
I had wondered if I needed to select a location under Insertion’ – it is currently set to ‘Run everywhere’ so I guess that’s correct?
Brilliant support as always from Enfold!Thanks, Anne
November 17, 2022 at 11:39 am #1372911Hi,
Glad we were able to help, ‘Run everywhere’ is correct. If you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.Best regards,
Mike -
AuthorPosts
- The topic ‘Shop category thumbnail images are suddenly the wrong size’ is closed to new replies.