You should have a look at the arguments of WP_Query. The following arguments should be what you need. Note that tax_query
takes an array of arrays.
$args = array(
'post_type' => array( 'post', 'videos', 'music' ),
'tax_query' => array(
array(
'taxonomy' => 'content',
'field' => 'slug',
'terms' => 'indy',
'operator' => 'NOT IN'
)
)
);
$myquery = new WP_Query( $args );
while( $myquery->have_posts() ):
$myquery->the_post();
# do your stuff here
endwhile;
Related Posts:
- How do I append multiple taxonomies to the URL?
- How to get the parent’s taxonomy?
- Query posts by custom post type and custom taxonomy
- Conditional Query of Custom Post Type and custom taxonomy
- attach CPT data to a taxonomy
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- Set a Default CPT taxonomy by taxonomy id
- Sort by Custom Post Type (Multiple Loop)
- Inserting two categories
- Query Multiple Taxominies Across Multiple Post type’s
- Change or update WordPress loop based on dropdown selection
- How do I get array of types associated with a taxonomy?
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Display all posts in main category and 1 subcategory
- Query/list all terms and their custom post count
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Display only one post each WEEK
- Custom Taxonomies not appearing in Admin
- Custom Post Type Taxonomy Filters
- How to use custom taxonomies to reference complex relationships?
- Query Custom posts of same taxonomy as the post itself
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- A question on creating filters for custom posts using taxonomy
- will post_id ever change? Can I safely use post_id for custom queries?
- List custom taxonomy specific to one custom post type
- Custom Taxonomy back-end customizations
- Show a Category X’s custom post type on Category X archive page?
- Custom Post Type Query for Sidebar Doesn’t Work on Front Page
- Taxonomy custom post type URL
- How do I move/order posts with a tag to the end?
- WordPress sort search results by custom order
- How to Filter custom post type by taxonomy?
- Is it possible to have dedicated page for parent/child taxonomy?
- Use same slug base for Custom Post Type posts, and multiple taxonomy terms
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Hide parent categories when clicked, and show it’s childs
- Get related posts of child term of custom post type
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- Display a grid of taxonomy terms at root taxonomy page
- How to start a new post with custom Taxonomies already set?
- limit value taxonomy based on previous taxonomy value wordpress
- How do I display the taxonomy for a custom post type in an array
- How to conditionally redirect to the post from a taxonomy page?
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- How do I display the grand child items of a taxonomy term?
- How to edit this code to get the categories in achieve page?
- Taxonomies relations
- Is it better to use WordPress Custom Post Types or Taxonomies?
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- Suggested Post and Taxonomy structure
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- How to add attributes to taxonomies that may be different from post to post?
- How to get list of taxonomy slugs ordered parents>childs?
- How do I share categories across multiple post types?
- Migrating a taxonomy’s tags to the native category
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- Listing all term items alphabetically / sorting loop
- How to produce a sub-page-system in WordPress
- How to display Related Posts based on number of taxonomy terms matched
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- How to Set Taxonomy Object Description?
- custom post type vs. conditionally displaying meta boxes for specific terms?
- How to make WP_Query not to show irrelevant posts?
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Custom Taxonomy Is Being Pulled into a Page, But It Doesn’t Have A Hyperlink
- Querying two taxonomies with tax_query not woking
- Rename a slug label
- Hide specific taxonomies from a taxonomy list using ‘get_object_taxonomies’
- Custom query – get_the_terms not work
- Custom taxonomy (categories) on custom post type return no results
- Variable not working in WP_Query
- Hide meta box for everything BUT a certain custom post type
- get_category_link() for custom post type does not include custom slug rewrite?
- List Categories (wp_terms) and count posts
- Control content before and after custom post type loop
- Targeting categories in custom fields
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- Display custom posts randomly in custom taxonomy archive
- How can I create an automatic drop down menu with my tags?
- How to define a term for custom taxonomy
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Alphabetically sort a taxonomy.php template by post title
- Not able to export large no. of posts in csv
- Custom Post Types not queried in Custom Taxonomy archives or Native archives
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Targeting custom post type via functions.php doesn’t work