You can set tax query in pre_get_posts
hook as well:
$query->set('tax_query', array(__standart parameters__));
Related Posts:
- Custom search filter causes menu and query_posts problems
- Search with filters and title
- Filter keywords from search query
- Ignore dots when searching in the media library?
- Search results sorted by post types
- Search by type posts and taxonomy
- Adding id and class to the search input in WordPress search form
- Sorting and limitation with pre_get_posts
- How to apply filter at search of woocommerce products?
- How to edit dashboard search posts button texts for my CPT?
- Filter custom post type using multiple taxonomy dropdowns
- Admin Backend – Search Pages only by title
- Get .subsubsub count of post per status queried using pre_get_posts
- Comment search plugin
- Remove posts inside pre_get_posts using a custom query
- Create Search Form to Filter Through Terms
- Filter pre_get_posts does not modify Mine/All/Pending
- Map plugin with proximity search compatible with Buddypress
- How to trim white space in search terms?
- get_posts() interrupt because of filter
- pre_get_posts to hide everywhere posts from “Archive” category
- conditional search
- Amend taxonomy to search in wordpress admin
- How to set a filter search for categories of blog posts in wordpress
- Customising the default wordpress search functionality
- Search with filters
- Apply pre_get_posts filter in a certain moment (just for a particular block of posts)
- Modify WordPress search behaviour in backend?
- Re-order search results with posts_orderby filter and post meta value
- meta box loop problem with a search filter
- Remove the post_content search from WHERE clause (and CONCAT sql function)
- Testing requested query in pre_get_posts
- Custom search fields and AJAX support
- using posts_where for meta data on pre_get_posts
- How we make the filter for fornt end user
- Filter and Search
- Taxonomy search filters
- Filter posts by multiple checkbox categories
- Search and Filter Using Custom Post Type, Custom Taxonomy, and Advanced Custom Fields
- Add custom options to the wplink dialog
- Filter specific shortcode output?
- Insert new element to array with add_filter
- How can I extend the Gutenberg table block transform to allow colspans/rowspans on pasted table elements?
- How can I add information underneath the user’s name on the users.php page?
- Is calling function_exists() faster or slower that apply_filters()
- Filtered query_vars becomes global. Why does this work?
- How to disable all WordPress emails modularly and programatically?
- Allow Profile HTML for select users
- Alter only the page title, not the post titles within
- Load different template file when condition met?
- Can’t get wp_title filter working in twenty sixteen child theme
- add_action uses ‘echo’ add_filter uses ‘return’, why?
- Overwrite default WordPress wording
- Using ‘posts_where’ on a query with a custom field
- Wrap h1-h6 in a div
- add filter login_redirect does not contain original requested redirect
- How to add numeric slug for child page in WordPress 5.9?
- Search function works improperly
- Custom Login Errors and variables I can use
- ‘the_content’ filter removing html tags from post content
- Feed, RSS not able to clear the cache and cannot change the limit of cache life time
- WP Filter to change the URL of an Anchor wrapping the last gallery image
- Gutenberg – Add align controls to a custom block
- To add a custom filter based on a meta field
- I can not include page to wordpress function add_filter, the_content
- How to filter my search in post if contains a word in title, content or excerpt?
- Add default user field to WooCommerce checkout [closed]
- Filters on Login Page
- the_excerpt filter doesn’t work as expected
- why pre_get_posts works fine in post type archive, but not in search result list?
- How to filter link?
- How to modify only part of a function through the filter
- How can I apply filters in my class that extends Walker_Nav_Menu?
- How should I be using filters and is_single together?
- How to edit embed filter for youtube video to allow responsive full width layout
- Remove get_template_part() from custom theme
- How to access page variable inside action hook
- Shorten the title length
- preg_match() not working with post content
- Search a title word through query_posts (not the exact match)
- Elementor Image Hover + Filter Grid [closed]
- comment_notification_text filter not working
- Line Breaks are stripped off when direction property is found
- How do I display main query posts in random order using add_filter
- Scanning for custom embed and prefetching
- WordPress remove_filter not working
- How to exclude or include categories in wp rest API without query parameters?
- Remove and replace woocommerce add to cart button [closed]
- Search Exact on WordPress – Relevannsi Solution Not Working
- Replace a specific URL on all apperances on the Website (Maybe a filter?)
- Strange behaviour of REGEX in a WordPress filter (trying to suppress emtpy paragraphs)
- Modify Contextual Help
- What is the proper/best way to have multiple add_filter for wp-job-manager-resume
- Modify WooCommerce email shipping text value
- Using Filters To Change Page Title
- can’t output gray scaled image I’ve created using add_image_size
- Replacing text using add_filter
- Background color and background image below element in Contact Form 7 – error tip [closed]
- Change password reqts with NO plugin without breaking resetpass link?
- How can I conditionally add the filter option_home?