- This topic has 3 replies, 2 voices, and was last updated 7 years, 9 months ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
These forums are now closed and remain for historical purposes.
None of the content applies to the new version 3. For support, get in touch via our contact form.
Forums › Forums › Search & Filter Pro › Show child posts only
You can achieve this b7y using our Edit Query Arguments filter:
https://searchandfilter.com/documentation/action-filter-reference/#edit-query-arguments
Thank you! Here’s what worked for me, in case anyone needs it:
function filter_function_name( $query_args, $sfid ) {
if($sfid==22)
{
$query_args['post_parent__not_in'] = array(0);
}
return $query_args;
}
add_filter( 'sf_edit_query_args', 'filter_function_name', 20, 2 );