Look at taxonomy parameters in WP_Query,
the “Multiple Taxonomy Handling” example does pretty much what you want if I understand you correctly.
Related Posts:
- How do I search inside specific taxonomies in WordPress
- Pass array of taxonomy terms to wp_query
- How to add custom meta to ‘pre_get_terms’?
- Search custom taxonomy term by name
- Why is my WP_Query not working when tax_query terms are an array?
- How to find objects by terms
- How to add terms to my tax_query based off of the current post
- Is it possible to dynamically get queried term AND taxonomy?
- Empty tax_query array returns an empty array
- How to find exact match for search term in WP_Query? What is the additional string added in LIKE query in WP_Query?
- Formulate a url to show posts with both taxonomy terms
- Creating a custom search for a specific post type
- Taxonomy search/filter with multiple taxonomies and multiple taxonomy terms
- Order by slug in get_terms with multiple taxonomies
- Function get_queried_object() return NULL in custom taxonomy
- Querying on multiple taxonomies pulled from $_GET checkbox array not working?
- WP_Query Not Recognizing Taxonomy Parameter in Custom Search
- Return Taxonomy/Term Information with Posts (WP_Query/get_posts)
- Editing the default wordpress search
- Get authors by term id or slug
- WP Query Args – Title or Taxonomy Value
- Slow queries on a huge database
- Search Query for multiple categories using ‘OR’ but having certain categories be ‘AND’
- Taxonomy order exception for specific term
- Modify Search Query if original Query gave no results
- Get a list of posts by specific category
- Get posts from multiple tax terms
- How to Order a list of taxonomies? orderby?
- WP Job Manager plugin – Listing only the twelve job categories on frontpage order by jobs they have
- Can’t get term id for category archive
- How to make a post with certain taxonomy term display first before other post with only one query?
- How can I order a post query’s results based on the number of matching taxonomy terms?
- Only show tag with the same id as the post
- Save queried result into database
- Add to search posts query array with post IDS which will appear first
- Search has query that will return no results
- WP Query – Search in title or author_name
- taxquery taxonomy get terms
- How to define a custom hierarchy for terms?
- How can I modify standard search query to include also ACF custom fields values?
- How can I get all the posts that are related with a specific taxonomy term?
- Search format not matching taxonomy query
- Search Functionality broken by the wp 4.2 update
- How to get several fields from wp_query?
- Need help setting up a search form for wordpress [duplicate]
- Displaying Results From Custom Taxonomy Query
- Search query alteration not working for meta values
- How can I get taxonomy term name using term slug & post ID using build in WordPress function or class?
- Search results stuck on page 1
- Advanced Search – Is this possible?
- Can I force WP_Query to return no results?
- What is the most efficient way of querying posts based on visits and date for current day?
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Order posts by tags count?
- Add and in the header while looping over custom query in page template
- Move posts to top of WP_Query if in certain Taxonomy?
- Which custom query am I in and how can I access its properties & methods?
- Querying Multiple Custom Taxonomy Terms
- Get array of current post term ID’s
- How do you query wordpress posts using a math formula between multiple meta field values?
- Change default ordering of taxonomy terms – pre_get_terms
- Including only current user’s posts in search
- Custom category search box for WordPress
- Refine search results using WP_Query
- Minimize database queries to user tables?
- Query all published post AND attachment with specific mime type
- Get all products which have both product category
- unable to retrive parent page information
- wp_query ‘s’, search filter with pagination is not working
- How to display user order by role
- WP Query related posts by tags
- Check if loop has any categories?
- WordPress query with items from more than one selfdefined taxonomy as `term` argument
- Query only the posts with a post format of “audio”
- WordPress query posts with multiple post_meta data
- Update query for wp_posts and wp_postmeta
- How to print term name inside wp post loop
- Grabbing taxonomy terms and inserting them into an array
- Insert images into wordpress post with a query
- WP_Query meta compare must include ALL array values
- Excluding posts from search results page with meta query not working
- WP Query by 4 different taxonomies
- pre_user_query vs pre_get_posts
- wp_query with meta_query and tax_query
- Adding nofollow to all the post links in get_posts with pre_get_posts or WP_Query
- Meta query orderby meta_value_num sorting by role first
- How to extend WP_query to a specific table?
- Taxonomy archive, categorised by other taxonomy, not hiding empty taxonomies
- Query posts in current category but not attachment format
- wp_query – Modify $query to include duplicate content
- $wp_query when new WP_Query
- Query custom post type by date field only working when two posts match the query
- Divide WP_Query posts by date & post type
- query by meta value then date and not empty meta value
- New WordPress WP Query using posts from certain categories
- Multiple Orderby is not working right
- WordPress WP_Query Search (‘s’) With Multiple Search Terms
- Use value from meta key array for use in WP_Query
- taxonomy-{term}.php terms pagination returning 404 after a certain page
- Using WP Query, I want to include all posts in category 1 as long as they are not also in category 2