Use this code instead.
$terms = wp_get_post_terms( $post->ID, array('competition', 'session') );
$term_slugs = wp_list_pluck( $terms, 'slug' );
$season = wp_get_post_terms( $post->ID, 'session' );
$season_slugs = wp_list_pluck( $terms, 'slug' );
$args = array(
'post_type' => array( 'football_fixture' ), // profile and letter are CPTs
'tax_query' => array(
array(
'taxonomy' => 'competition',
'field' => 'slug',
'terms' => $term_slugs
),
array (
'taxonomy' => 'session',
'terms' => $season_slugs,
'field' => 'slug')
)
);
$my_query = new WP_Query($args);
Related Posts:
- Query Multiple Taxominies Across Multiple Post type’s
- How to Filter custom post type by taxonomy?
- How do I display the grand child items of a taxonomy term?
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- tax_query not working?
- How to get all taxonomies of a post type?
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- How do I append multiple taxonomies to the URL?
- Custom Taxonomy as Dropdown in admin
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to completely disable a taxonomy archive on the frontend?
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Custom taxonomy not showing up when adding a new custom post type
- How do I list custom taxonomy terms without the links?
- How to list custom taxonomy categories?
- 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
- How to list all categories and tags in a page?
- Retrieve single term slug
- Taxonomy archives based on Custom Post Type
- Create an archive page for custom taxonomies
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- Order posts by (hierarchical custom) taxonomy terms and term children
- How to show term-specific post list, without posts associated with child terms?
- Sorting a list of posts displayed under a list of associated terms (which should be sorted without initial articles)
- How to get the parent’s taxonomy?
- Query multiple taxonomy in Custom Post Type
- Include custom post type in “all posts”
- How do I list terms of a custom taxonomy at i.e. domain.com/brands/
- wp_insert_post custom taxonomy
- Count number of posts which exist in 2 taxonomies?
- Custom Post Type: How to display all of same taxonomy?
- Taxonomy-{taxnonomy}.php is not working
- Display taxonomy term only if there’s a value
- Remove “-2” from a Toolset Types URL with the same post name
- Get list of terms of current taxonomy archive for another taxonomy
- Get all taxonomies for all post types
- Custom post type taxonomy template
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Associate Taxonomies Across Post Types
- Use the_taxonomies() to create a simple list
- Listing taxonomies from custom post type
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Taxonomy Templates
- Query for custom post type objects in a taxonomy and with a meta value
- Custom Post Type and Taxonomy combination
- Show Post Count of a Category
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- Order WordPress Custom Taxonomy Pages & Pagination Not Working
- Relationship between two taxonomies and a custom post type [closed]
- Menu Multiple Taxonomies
- tax_query returning all posts instead of selective posts in WP_Query
- How to make a custom taxonomy selectable in post publish area?
- Problem with custom post types, taxonomy and permalinks
- How to create new category for custom post type?
- Fetch taxonomies by custom post type id array
- How to check the terms in single custom post type template
- get_terms showing all categories instead of the ones assigned to a specific post
- How can I move a custom taxonomy and its data from one post type to another?
- Custom page template for category taxonomy
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- How do I get array of types associated with a taxonomy?
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Display all posts in main category and 1 subcategory
- wp_get_post_terms on custom post type with custom taxonomies returning an empty array
- Custom Taxonomies not appearing in Admin
- Custom Post Type Taxonomy Filters
- Tax query not producing any results
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- Is it possible to have dedicated page for parent/child taxonomy?
- Why are taxonomy terms not saving when using custom meta boxes with radio button taxonomy selectors?
- Custom post taxonomies as tax_query terms?
- 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
- limit value taxonomy based on previous taxonomy value wordpress
- Using meta_query and tax_query at the same time
- 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?
- 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