Home › Forums › WoodMart support forum › Limit number of Search results › Reply To: Limit number of Search results
July 13, 2018 at 6:23 am
#67278
Artem Temos
Keymaster
Hi,
1. Find this element in our header builder and decrease the number of results https://gyazo.com/f00fea2ac66f70b62ce2e20f9f9b5afd
2. Sorry, but they are calculated automatically for all carousels on your website. If you will change it to 2 products, all similar carousels will be changed accordingly. Try to use this code and add it to the functions.php file in the child theme
function woodmart_get_owl_items_numbers( $slides_per_view, $post_type = false ) {
$items = array();
$items['desktop'] = ( $slides_per_view > 0 ) ? $slides_per_view : 1;
$items['desktop_small'] = ( $items['desktop'] > 1 ) ? $items['desktop'] - 1 : 1;
if ( $items['desktop'] == 6 ) $items['desktop_small'] = 4;
$items['tablet'] = 2;// ( $items['desktop_small'] > 1 ) ? $items['desktop_small'] : 1;
$items['mobile'] = ( $items['tablet'] > 2 ) ? $items['tablet'] - 2 : 1;
if ( $items['mobile'] > 2 ) {
$items['mobile'] = 2;
}
if ( $post_type == 'product' ) {
$items['mobile'] = woodmart_get_opt( 'products_columns_mobile' );
}
return $items;
}