WP_Query Not Recognizing Taxonomy Parameter in Custom Search
The better option may be to use the pre_get_posts hook instead to modify the query before it gets requested instead of creating your own query. Here’s what it would look like: /** * Modify Theme Queries * – https://developer.wordpress.org/reference/hooks/pre_get_posts/ * – https://codex.wordpress.org/Plugin_API/Action_Reference/pre_get_posts * * @param $query * * @return void */ function theme_pgp( $query ) … Read more