It was actually firing too early. Still I can’t seem to add the post to the results.
Here is my code:
function people_filter( $query_args, $sfid ) {
if($sfid == 7287)
{
if ($_GET["_sfm_people"] != "") {
array_push($query_args['post__in'], intval($_GET["_sfm_people"]));
echo '<pre>',print_r($query_args,true),'</pre>';
}
}
return $query_args;
}
add_filter( 'sf_edit_query_args', 'people_filter', 20, 2 );
And here is what the print_r is echoing:
Array
(
[paged] => 1
[search_filter_id] => 7238
[search_filter_override] =>
[posts_per_page] => -1
[post_status] => Array
(
[0] => publish
)
[meta_query] => Array
(
)
[post_type] => Array
(
[0] => lesson
[1] => people
[2] => video
[3] => image
[4] => article
)
[is_search] => 1
[post__in] =>
)