Skip to content

Commit e52526b

Browse files
committed
Adds filter to query for taxonomy exclusion
Simply adds a filter so that other developers can modify the default query and add in a tax_query array for exclusion/inclusion
1 parent 72ff514 commit e52526b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

class-wds-react-post-search.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ public function search_posts( $request ) {
390390
'posts_per_page' => -1,
391391
'post_type' => $this->get_valid_search_post_types( $request ),
392392
's' => sanitize_text_field( $request['s'] ),
393+
'tax_query' => apply_filters( 'wds_react_post_search_tax_query', array() ),
393394
];
394395

395396
// Get posts.

0 commit comments

Comments
 (0)