How can I set the mobile search bar to show only 5 products in dropdown list?
-
Thanks, it is working now in search result page.
Another question: How can I set the mobile search bar to show only 5 products in dropdown list?
Hello,
Sorry, but there is no option in Theme Settings available for that. It requires customizations and this is beyond our limitations and support policy.
If you’d like to contact us, we are here for whatever questions you may have.
Kind Regards
Hi,
But, I can set the search results count in desktop header, and why it is removed this setting in mobile header?
Screenshot: https://prnt.sc/vyovR1Ig9w4e
Hello,
1. In the wp-content\themes\woodmart\inc\modules\search.php
file, you need to find this woodmart_search_form
function and add the follow string $args = apply_filters( 'woodmart_search_form_args', $args );
as shown in this https://monosnap.com/file/FiCDog0yEwMPbPcVKF3W6C4ZLFsjD8 screenshot
2. After that, in the child theme -> functions.php define the code below:
add_filter(
'woodmart_search_form_args',
function ( $args ) {
$args['count'] = 5;
return $args;
}
);
This will change the number of search results for all search forms on all devices.
Kind Regards
Thanks, the code is working fine.
Please also update this function in next version.
Hello,
Glad I could help! If you need further assistance, I’m here for you.
Take care!
Kind Regards
The topic ‘How can I set the mobile search bar to show only 5 products in dropdown list?’ is closed to new replies.