Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Partial matching starts with › Reply To: Partial matching starts with
August 25, 2022 at 12:34 pm
#39027
Keymaster
Sure, that is even a bit simpler:
add_filter('asp_query_args', 'asp_query_args_search_at_four', 10, 1);
function asp_query_args_search_at_four($args) {
$args['s'] = mb_substr($args['s'], 0, 4);
return $args;
}