According to the Codex, here’s how you would query posts from several taxonomies:
'tax_query' => array(
'relation' => 'AND',
array(
'taxonomy' => 'videoscategory',
'field' => 'slug',
'terms' => $custom_term->slug
),
array(
'taxonomy' => 'yourothertaxonomy',
'field' => 'slug',
'terms' => $other_custom_term->slug
)
)
Related Posts:
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- Display all posts in a custom post type, grouped by a custom taxonomy
- Retrieving 3 latest post from each of 5 different custom post types
- how to group custom post type posts by custom taxonomy terms
- How to get the parent’s taxonomy?
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- ‘category__and’ for custom taxonomy?
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- wp_query to find posts by year and month
- Custom Post Type Loop within Shortcode
- Filter by custom taxonomy slug on a custom post type
- Display CPT posts based on specific taxonomy
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Custom loop with multiple taxonomy queries
- Show a Category X’s custom post type on Category X archive page?
- What’s the WP way to load remaining custom posts?
- Listing all term items alphabetically / sorting loop
- pagination not working for category.php (custom post types in categories)
- How to display Related Posts based on number of taxonomy terms matched
- How to make WP_Query not to show irrelevant posts?
- Control content before and after custom post type loop
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Pagination not working on custom query on a page
- display posts of custom post type with custom taxonomy
- postsperpage value not being applied
- List all Custom Post Type posts excluding certain Taxnomy term
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Loop for custom-post-type comparing taxonomy terms for “related” posts?
- Custom Post Type Query W/Category Dropdown
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- What is the most efficient way to execute recursive complex queries?
- Sorting the Loop by Taxonomy Value
- custom post type and a “sticky” position taxonomy
- WordPress custom post type
- Loop with Custom Post Type and Taxonomies
- display news with pictures 3 small and one large (loop)
- Post data in separate divs with incrementing class using WP_Query
- Catergory args causing loop not to show
- How do I correctly query posts from a post ID?
- display custom post type from register taxonomy
- How to exclude certain portfolios from a loop
- Complex Custom Loop with Includes
- Custom Taxonomy with Custom Post Type Finds No Posts
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- Multiple Archive Pages for Custom Post Types AND Taxonomies
- Quickest way to get last or oldest post date – WP Query
- Querying CPT with Two Taxonomies
- Custom Query to display posts with custom field
- Get taxonomy description based on variable
- WP_Query | ‘post_type’ doesn’t work
- Sorting multiple custom post types without a meta key/value pair by sort order
- Change or update WordPress loop based on dropdown selection
- Pagination : How to remove /page/x/ after a ‘POST’ action on a form returning to page 1
- Can I create a loop with multiple post types and specify different $args for each post type?
- Display custom post type from dynamic custom field
- get_attached_media() on author page not working
- Two near-identical custom field types – one works, the other doesn’t . What can cause this?
- wp_query check if integer exists in custom field’s array
- Search / Filter posts on Title/Content OR Tags
- Custom-Posttype & Custom Taxonomy WP_Query
- Return the latest post from a custom Taxonomy and Post Type
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- Full Custom Post Type List Organised by two Taxonomies
- Query Custom Post Type Taxonomy term with multiple parameters
- Retrieve custom post types by custom taxonomies with WP_Query
- How can I group posts by months and years?
- Using page slug in wp_query
- Custom query – get_the_terms not work
- Custom taxonomy wp_query woes.
- attach CPT data to a taxonomy
- Having Issue on Ordering CPT by Custom Field In Custom WP Query
- Different options per post type in WP_Query
- Custom Category Walker with Image, Fallback to Most Recent Post in Category Image
- Custom Post Type not showing in main loop
- My custom taxonomy is only displaying 1 of 3 terms
- Display the current post in browser as the first post in a loop (for a slideshow)
- How to query Posts from a custom post type which contains a custom taxonomy?
- How to retrive Custom Post Type Meta Fields in Custom WP_Query
- Custom Post type showing up in loop, regular posts are not showing up
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- custom taxonomy pagination 404 error
- Custom archive page for custom taxonomy and pagination issue
- Pagination Not Working When Used With WP_Query() `offset` Property
- Excluded Custom Taxonomy Term Posts Displaying in loop
- Some posts not displaying by taxonomy term
- WP_Query for custom taxonomies showing posts from non-specified terms?
- How can I group by Taxonomy on Custom Post Type while filtering out based on custom Meta
- subtracting the current post form then whole loop, which is generating all CPT titles
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Imported Content Doesnt Show Up On Frontend
- Get posts associated with custom taxonomy alternate way
- WordPress Custom Post Type and sort by Tags
- Sorting custom post types by taxonomy (So close)
- Looping taxonomy in taxonomy?
- Get X posts with the same terms as the current post (custom post type and custom taxonomy)
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- How can I show posts with the same tag?
- WP Query – Can’t get posts with specific taxonomy