I’m not sure that there is a way to get it to use ‘OR’ instead of ‘AND’. Alternatively, you can do:
$myquery['tax_query'] = array(
'relation' => 'OR',
array(
'taxonomy' => 'regions',
'terms' => array('region1'),
'field' => 'slug',
'operator' => 'IN'
),
array(
'taxonomy' => 'population',
'terms' => array('pop1'),
'field' => 'slug',
'operator' => 'IN'
),
array(
'taxonomy' => 'population',
'terms' => array('pop2'),
'field' => 'slug',
'operator' => 'IN'
)
);
query_posts($myquery);
Related Posts:
- Query 1 taxonomy term, exclude another
- Ordering terms before displaying posts
- post_parent array doesn’t work
- how to store wordpress loop in array?
- WordPress query reverse order
- WP Query by 4 different taxonomies
- Ordering of posts, 2020 Year showing as next event when should be last
- Post Filter clearing on pagination $_post
- Adding Category Argument into an Array for WordPress Query
- orderby not working for query_posts using array of IDs
- How do I find the first item in the post array?
- How can i get count from query post
- Using WP_Query to Query Multiple Categories with Limited Posts Per Category?
- Is there a way to exclude the content from the post variable to save on RAM usage?
- Display/query post formats
- How to query post by user role?
- Ensuring sticky posts are retrieved first (without using two queries)?
- Determine if more posts are available than was asked for in `query_posts()`?
- query_posts() in function makes global $wp_query out of sync?
- Limiting query_posts to 1, regardless of sticky post?
- WordPress Custom Query
- advice on creating a ‘related posts’ query like the one used on stackexchange
- Using dynamic conditions in ‘posts_where’ filter
- Showing posts by collection of specific terms and texonomy
- Help altering a query to exclude all but standard post format
- List users with the most total posts view
- How to limit search to first letter of title?
- Post Title displaying but not in the wrapped HTML I need
- get_post_meta causes database queries
- How to ensure that is_search() return false after query_posts
- Inserting Post Using wp_insert_post. How to Fill Yoast Plugin SEO Fields
- Why is that gdsr_sort=thumbs (GD start rating plugin) only works with query_posts and not with WP_Query?
- Query_posts $query_string
- How to order posts by slug using query_posts/ Wp_query
- Order by meta_key with two meta_queries
- Pagination on custom query
- Search stores (custom postcode field) within 5, 10, 15 miles of user inputted postcode.. Code modification
- What is the difference between “manage_{$post_type}_posts_columns” and “manage_edit-{$post_type}_columns”?
- Sort Posts by Multiple Meta Values [duplicate]
- Querying posts with meta value that begins with a certain pattern
- How to show only today’s post?
- use query_posts to return a post OR a page by ID
- Adding Variables to post query
- Unable To Get Published posts using query_posts
- ACF Custom Field WP_Query, but need to get all posts, if field doesn’t exist
- Read More is not working in query posts
- query_posts for child pages
- How to reverse the order of WordPress blog posts?
- orderby:date not working
- Placing post data (title, date, and excerpt) nested in static content
- Single meta key with multiple meta value in like comparison
- Displaying terms based on loop posts?
- Authors List page – How to include only those with wp_user_level as Author
- list child page items (1 level with meta keys)
- Set multiple Post Terms in same Taxonomy
- Limit the post for differents custom post type in the same wp_query
- Sorting a query Field by date
- Show Blogroll of another WordPress site
- Trying to package posts for republishing by partner offsite
- Why this code causes infinite loop?
- Each post is showing twice in my custom query…?
- number of posts per page + random + exclude categories
- query_posts() – problem with “s” parameter
- How to Query Post
- query_post and wpdb returning different results
- Exclude current sticky post
- Page title in post query
- query_posts pagination will always show identical content
- Question about querying posts
- How to write sql query to get the posts from a custom taxonomy term name
- How to list most popular post
- WordPress Custom Query to get Most Commented Posts in the Past 7 Days
- How can I query for all children posts regardless of parent
- INSERT in table row fatal error
- How to reverse post navigation at bottom of post
- WP-API: get posts in multiple categories
- Removing a taxonomy term
- List terms of custom taxonomy if matches other taxonomy
- Restrict query_posts by Date?
- How to solve this without flushing the rewrite rules for each post query the visitor triggers?
- Sort post by custom field numeric value
- Notting but the latest post content keeps on being loaded
- query_posts doesnt show pages with given ID when post_type => page
- How to order a taxonomy’s terms numerically, from lowest to highest using get_terms
- How to put posts in pages using query posts
- Query add html after set amount of posts?
- Custom loop off by one post
- How to setup blog page to render blog posts minus afew categories
- How to get max value of filtered query post
- Get All Taxonomy Terms From Get_terms Array With Specific Array Key
- Pagination doesn’t work in query post in tag template
- How to display most popular post by views count in WordPress?
- How to optimize ‘select found_rows()’ query? Several ‘high load average’ alerts daily
- query multiple posts by id using a string parameter, not array()
- query_posts – slightly more advanced query
- Query posts in a category and include only one post per author?
- Query Posts Creates 404 Error
- Achieving pagination with `query_posts`
- Create heirachy of post terms from array & assign post to terms
- query_posts works while get_posts doesn’t