Skip to content

Commit

Permalink
= 4.2.6.6 =
Browse files Browse the repository at this point in the history
~ Fixed: search ?s= exclude questions
  • Loading branch information
tungnxt89 committed May 2, 2024
1 parent 6ffaf78 commit 2913eee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions inc/class-lp-page-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,14 @@ public function pre_get_posts( WP_Query $q ): WP_Query {
$q->set( 'post__not_in', $list_ids_exclude );
}

// Not search questions
$searchable_types = get_post_types();
unset( $searchable_types[ LP_QUESTION_CPT ] );
$q->set(
'post_type',
$searchable_types
);

return $q;
}

Expand Down

0 comments on commit 2913eee

Please sign in to comment.