Didn’t test the following code but it should help you in the right direction.
$args = array(
'post_type' => array('venues', 'events'),
'post__not_in' => array($post->ID),
'tax_query' => array(
array(
'taxonomy' => 'custom_taxonomy',
'field' => 'slug',
'terms' => $tags,
)
)
);
Related Posts:
- Filtering a custom post type by custom taxonomy in archive template
- get term archive url / link
- Get term slug of current post
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- Custom Taxonomy Template Post List with Sort Order
- The Operator “NOT IN” Does Not Work In tax_query
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Populate Taxonomy from Custom Posts
- Show related posts on single page by custom taxonomy on custom post
- Exclude from search all custom posts which are NOT in a taxonomy term
- Post type archive page not working
- How to get the parent’s taxonomy?
- Help with hierarchical custom taxonomies and permalinks…almost there
- wp_insert_post custom taxonomy
- Display taxonomy term only if there’s a value
- How to get only one category of custom post type?
- Create separate template for shared custom taxonomy with shared terms
- Get URL for specific post type and current tag
- Custom/separate categories for custom post type
- Append taxonomy terms as class names in markup?
- Custom Post Type Pagination & duplicate posts
- Connecting a taxonomy with a post type
- How to achieve representation of streets index with custom taxonomies
- Optimised Code for Pulling Taxonomy Posts
- Why is my custom loop not filtering correctly nor paginating?
- Display types of posts in edit.php instead of All, Published, Scheduled and Draft
- Custom post types with custom directories
- How to filter custom taxonomy categories on archive?
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- get_terms showing all categories instead of the ones assigned to a specific post
- Custom post type and taxonomy slug issue
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Custom Taxonomy Permalinks Redirection
- Custom template won’t load for a custom post type (custom permalinks used)
- shortcode to show custom post types by category
- Single Template that can be applied only via URL
- Genesis filterable portfolio isotope [closed]
- Adding a custom post type taxonomy template in plugin
- Loading custom content type from ajax results?
- Get parse_query filter to return slug instead of id
- Custom post type and taxonomy – show related posts
- Add custom image size for custom post type or taxonomy
- Can’t remove front from permalinks for custom taxonomy category page
- Allow duplicate slugs for custom post type with taxonomies
- Display a grid of taxonomy terms at root taxonomy page
- Custom Permalinks with CPT and Hierarchical Taxonomies
- Display Custom Taxonomy Alphabetically
- How to make custom taxonomy into drop down select in a custom metabox
- posttype/taxonomy/term archive page 404 error
- How to add attributes to taxonomies that may be different from post to post?
- Custom post type, permalinks, taxonomies and blog posts
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- Custom Post Archive is not working
- Getting the taxonomy
- Wp Query with multiple custom tag(taxonomy) by get the terms
- Problems with custom taxonomies
- looping though custom post types and only return results in a given taxonomy
- Get taxonomy term by slug in post on archive page
- Query not work for current taxonomy
- Hide custom post type from search based on custom taxonomy
- Custom Taxonomy Template file not being used
- Replicating category/location page heirarchy
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Non-permalink custom taxonomy not found
- What should I learn to develop event management in wordpress? [closed]
- Custom post type category permalinks and archive pages
- Better in the long run to use post date or custom taxonomy to sort/separate posts by year?
- add_filter get array data before display in custom post_type
- Custom endpoint filtering post by custom taxonomies
- Custom post type rewrite url structure with taxonomy and sub taxonomy
- Custom Post Type with Category Separate
- Define multiple prefixes for custom post type
- Remove custom taxonamy slug with pagination
- Related posts by taxonomies does not work , what could be the reason?
- Display first post of a term in taxonomy template
- How to transfer categories (default) to custom taxonomy?
- Order archive custom posts by taxonomy term [duplicate]
- Custom Taxonomy – fields
- CPT Loop, include taxonomies and disclude others?
- Problem displaying posts for a category in a custom taxonomy
- Create Inclusions and exclusions
- Template hierarchy changes when custom post-type permalink leverages custom taxonomy
- Custom taxonomy- only output relevant terms
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Same permalink structure for all post types?
- How to have working breadcrumbs with several taxonomies associated with a custom post type
- How to solve performance issue caused by custom post type overview with 20k+ custom taxonomy terms
- Prevent repetitive terms in get_the_term_list
- Show taxonomies from specific CPT
- Category / Custom Post Type permalink issue
- link posts to custom post type
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Most appropriate way to display CPT’s by children terms of custom taxonomies while retaining desired permalink structure?
- See the process of creating a taxonomy and tell me where I made a mistake
- Navigation won’t update to show full path to single post
- Advise on Custom Taxonomies and Structure
- Limit taxonomy terms added to a custom post type
- I want to understand plugin implementation of custom posts / taxonomies / metaboxes
- Dynamically count the number of custom post types associated to a custom taxonomy