Hello guys,
I have exactly the same problem of this topic (resolved):
https://support.searchandfilter.com/forums/topic/adding-post-ids-to-returned-results/
I did what you suggest, but it returns all posts instead my array on $args[‘post__in’].
If I use $args[‘p’] or $args[‘meta_query’] for example, it works fine.
Here is my code:
function filter_function_name( $args, $sfid ) {
//if search form ID = XX, the do something with this query
if ( $sfid == 2817 ) {
$args['post__in'] = array(3662, 3667); // for example
}
return $args;
}
add_filter( 'sf_edit_query_args', 'filter_function_name', 20, 200 );
Thanks in advance 🙂