Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › More that one value in selector › Reply To: More that one value in selector
Hi,
Well, that is not possible, the options will be treated as single string or numeric values. It might be however possible using a custom code. I have constructed this to help you out.
1. Add this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!
add_filter('asp_query_args', 'asp_cf_filter_multivalue', 10, 1);
function asp_cf_filter_multivalue( $args ) {
if ( isset($args['post_meta_filter']) ) {
foreach($args['post_meta_filter'] as $k => &$v) {
if ( strpos($v['value'], '::') !== false ) {
$v['value'] = explode('::', $v['value']);
foreach ( $v['value'] as &$vv )
$vv = trim($vv);
}
}
}
return $args;
}
2. On lines, where you want multiple values, use this syntax:
Apartadó::Bello::El Retiro||ANTIOQUIA
Basically just separate the values by ‘::’, and that should do it. I cannot guarantee this solution will work in all cases, but it is worth trying.
I have noted this as a request, and will most likely implement in the upcoming release.