Hey Matt
This is pretty tricky actually.
Since the introduction of the cache, most queries are sent off to the cache DB, and they return a number of IDs… which are placed inside the post__in
field in a query.
So, I’m actually scratching my head as to how we could do this.
There is a filter for modifying the query:
http://www.designsandcode.com/documentation/search-filter-pro/action-filter-reference/#Edit_Query_Arguments
add_filter( 'sf_edit_query_args', 'filter_function_name', 10, 2 );
Which should be used like:
function filter_function_name( $query_args, $sfid ) {
//if search form ID = 225, the do something with this query
if($sfid==225)
{
//modify $query_args here before returning it
$query_args['post__in'] = array(1,2,3,4);
}
return $query_args;
}
Which S&F also uses for setting up the query – and will probbably overeride this withe the results from the S&F cache.
Try initializing hook much later (so S&F has finished with the post__in var):
add_filter( 'sf_edit_query_args', 'filter_function_name', 10, 200 );
Thanks