Reply 334553 to: How to customize layout of search results page

Avatar: Rose Tyler
Rose Tyler
Support staff
September 20, 2022 at 08:51

Hello,

1/ It can be done with adding about 500lines of code inside your child-theme but we would recommend you firstly to create a feature request here -> https://www.8theme.com/roadmap/ and if it is popular among our customers it will be moved to ‘in progress’ state and implemented as option or filter.
2/ By default all products take the same size on the search page as they have on shop page -> https://xstore.8theme.com/elementor/demos/marseille03/shop/ . You may add next snippet to your child-theme/functions.php

add_action('wp', function() {
if ( is_search() ) {
add_filter('single_product_small_thumbnail_size', function() {
return 'full';
});
}
});

Example: https://prnt.sc/pDO5QaXd3jtu
Example frontend: https://prnt.sc/LHr_q90DTHhS
Instead of ‘full’ you may use one of next sizes -> ‘thumbnail’, ‘medium’, ‘large’, ‘woocommerce_thumbnail’, ‘woocommerce_single’, ‘woocommerce_gallery_thumbnail’. Note: you may also set array(50, 50) -> https://prnt.sc/oFAp60zouXZH or other values inside array to get most closer sizes of generated (previously) images shown on frontend -> https://prnt.sc/UiqAvprYxCvq

Regards

Go To The Whole Conversation In Topic
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.