This topic has 2 replies, 2 voices, and was last updated 2 years, 2 months ago ago by Rose Tyler
Search results is listing posts in slider format. How can i change this to post grid format ?
https://xstore.8theme.com/elementor/demos/marseille03/?product_cat=0&s=quis&post_type=product&et_search=true
And how to change aspect ratio/widthxheight of shop products in search page. I am looking to change this to 4:3 aspect ratio
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
You must be logged in to reply to this topic.Log in/Sign up