Hi there
I understand the scenario.
We have a filter, to change the default in the search form, but this won’t affect the results.
This would be the code (untested ofc):
function filter_input_object_categories($input_object, $sfid){
//ensure we are only filtering the correct field name - in this case the field we want to filter has the name <code>_sft_marketplace</code>
if($input_object['name']!='_sft_marketplace'){
return $input_object;
}
//manually set the values shown/selected in the field - must be array even if single value
//this should really only occur under specific conditions, otherwise your field will be permanently set to this value
//if the field is not already in use / selected
if(!isset($_GET['_sft_marketplace'])){
//then set it to "best wordpress app themes"
$input_object['defaults'] = array("best-wordpress-app-themes");
}
return $input_object;
}
add_filter('sf_input_object_pre', 'filter_input_object_categories', 10, 2);
Thanks