here is the answer:
$args = array(
'post_type' => array( 'artists', 'post' ),
'post_status' => 'publish',
'tax_query' => array(
'relation' => 'OR',
array(
'taxonomy' => 'tag_artists',
'field' => 'slug',
'terms' => array( 'home' )
),
array(
'taxonomy' => 'post_tag',
'field' => 'slug',
'terms' => array( 'home' )
)
)
);
$query = new WP_Query( $args );
Related Posts:
- How to use a custom post type archive as front page?
- Combining queries with different arguments per post type
- How do you get the count of posts in an archive page?
- Mixing regular and custom post types (with meta_query) on home page
- How to make a WP_Query search with custom post types?
- $wp_query->queried_object->ID throws warning: Undefined property
- how to filter by last name for custom post
- The Operator “NOT IN” Does Not Work In tax_query
- Display Custom Post Type Fields
- Use WP_Query object inside a function
- WP_Query search custom posts meta date fields
- How to get_queried_object on multiple objects?
- How to get the parent’s taxonomy?
- Using new WP_Query in shortcode in a custom field causes the main post content to not display
- WordPress query by multiple Custom fields and order by date
- Help with hierarchical custom taxonomies and permalinks…almost there
- New WP_query in template not working with CPT+category on some pages
- query order by date on custom type: wrong order
- Displaying a specific post in a wp query by post id
- Query current and future events, ordered by begin date
- Query custom post types and a specific page?
- WP_Query search posts by custom post type and custom taxonomy
- Unable to get post content from custom post type loop
- WP-Admin edit.php & post.php slowdown after import of 10k users
- How to dynamically attach pictures to a carousel
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- WordPress Orderby Numeric Value Not Working
- How to call a custom post type with WP_query
- How to add pagination to wp_query [duplicate]
- WordPress custom loop filter by meta_key and value with serialize data
- Show one item per category of a custom post type
- Storing posts from query and accessing later via AJAX call
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Mixing 2 custom post types with posts output in specific pattern
- Show only one post on custom post type archive
- How can I made custom taxonomies relationship?
- Why is this query not working? (Standard posts + custom post type)
- Pagination issue on category.php using custom post type query
- How to get all tags of a custom post type by id
- Limiting posts_join, where, etc to a specific WP_Query object?
- How to make WP_Query not to show irrelevant posts?
- Create an archive page for custom post type with custom taxonomy
- WP_query – Filter by tax_query and meta_query using multiple select
- Create a list of recent Custom Post Types posts
- Empty search input does not return all posts
- How to sort a WP_Query by a custom field AND ALSO filter by a different custom field
- Undefined $post in wp_query
- Adding Multiple Post Types to Query [duplicate]
- Get current user id
- WP Query results showing posts outside of category ID
- tax_query (if the terms are empty)
- List latest post out of 2 custom post types
- How to count other posts not having specific taxonomy terms?
- Group by custom field value (start and end times)
- Running a custom query inside another cpt single and trying to grab a variable
- Get posts by category name
- WP_Meta_Query object with conditionals
- How to properly use Categories with Custom Post Types
- Problem while filtering by ‘category_name’
- Displaying Portfolio Filter by Category Order (alphabetically)
- Custom Post Type Query W/Category Dropdown
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- How to order query results based on if a custom field has been populated, then the order by the date of the post?
- Pin posts to top of custom loop
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- WP_Query get always custom post_type for first
- WP_Query – How To Query Only Custom Posts With No Children of Their Own?
- Foreach result into WP_query
- Query custom post type and custom field by URL parameters
- meta query multiple values for the same key
- Custom post types – meta_query: search lesson which starts sooner
- Wp Query sort order from custom MetaBox
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Custom Post Type Query by user id
- Query posts based on user preferences
- CPT post doesnt shows tags and category on backend admin page
- Adding a nav menu for a custom post type
- How to use costum database table for custom post type
- Most efficient way of showing children posts?
- Querying, storing, and using data from 2 separate custom post types
- date_query won’t accept day parameter, but will accept month and year for a custom post
- How can I use WP_Query argument ‘Like %..%’?
- Custom post type and custom taxonomies display
- WordPress custom post type
- Custom Post ‘Post Per Page’ Crashing Page?
- Custom post type single display is ommited
- Issue with permalinks for custom post type
- Query child posts on parents single.php?
- Paged within a custom content type template [duplicate]
- WordPress can only query up to 766
- Custom Post Query Combined with Conditional Tags
- Custom loop won’t work, can’t find problem
- Query by post type or category
- Get all custom_post_type posts + blog posts from one category in a single query
- Customising wordpress search and using $_GET[“s”]
- How to exclude certain portfolios from a loop
- show the most recent date of all posts to display on front end
- Can I add a wordpress page using the slug for a CPT rewrite
- Assign a tag to custom post type using a query