I’m having problems filtering sf_edit_query_args with the post__in query arg. Here’s a quick prototype that I have:
add_filter( 'sf_edit_query_args', function( $query_args, $sfid ) {
if ( 20205 === $sfid ) {
$query_args['post__in'] = array( 20696, 20694, 20612 );
}
return $query_args;
}, 20, 2 );
I double-checked that 20205 is the id of the search&filter form and that 20696, 20694, 20612 are actual custom post type ids. The form works as it should with the usual search&filter search field, custom post type filters, tag dropdowns, etc. But I’m not able to filter it programmatically with the provided post ids (however, it works correctly with a provided custom post type – $query_args['post_type'] = 'custom';
). It simply returns no results. Is the post__in query arg not supported?
Thanks!