Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › 'post_parent' != 1 › Reply To: 'post_parent' != 1
November 3, 2019 at 8:17 pm
#24508
Participant
Hi! Thanks for your reply!
I’m actually looking to exclude posts; however, this code does not appear to work:
add_filter( ‘asp_query_args’, ‘asp_exclude_by_ids’, 10, 2 );
function asp_exclude_by_ids( $args, $id ) {
$args[‘post__not_in’] = array(539);
return $args;
}
Thank you