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?
- Saving Taxonomy Terms
- Get Posts by Custom Post Type ,Taxonomy, and Term
- 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)?
- Taxonomy archives based on Custom Post Type
- Get the ‘slug’ of a custom taxonomy
- Custom Metabox with Taxonomy Dropdown – Saving Issue
- How to show term-specific post list, without posts associated with child terms?
- Include custom post type in “all posts”
- Custom Post Type: How to display all of same 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?
- 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 Taxonomy Creates Unwanted Integer Terms on Post Save
- tax_query returning all posts instead of selective posts in WP_Query
- $wpdb: Counting posts corresponding to 3 terms in 3 different taxonomies
- Custom Post Type Taxonomy Filters
- Custom Taxonomy back-end customizations
- Taxonomy custom post type URL
- Custom post taxonomies as tax_query terms?
- Get related posts of child term of custom post type
- 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?
- Suggested Post and Taxonomy structure
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- How to get list of taxonomy slugs ordered parents>childs?
- How do I share categories across multiple post types?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Custom select query for taxonomies that have posts categorized in another taxonomy
- Rename a slug label
- WP_query – Filter by tax_query and meta_query using multiple select
- Hide meta box for everything BUT a certain custom post type
- 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?
- Get taxonomy singular name instead of taxonomy slug inside $taxonomy query
- Custom taxonomy template list not working (404)
- Use the custom post type archive for taxonomies?
- Query custom post types & Taxonomies and list them in a table on a page
- Taxonomy template page not working
- tax_query (if the terms are empty)
- Creating custom post type posts and associating them with a post from another custom post type
- Getting List of child terms from custom taxonomy parent
- Running a custom query inside another cpt single and trying to grab a variable
- Get posts by category name
- Custom Post taxonomy template
- Query Multiple Custom Post Types & Exclude a Taxonomy Term
- Query all posts under one taxonomy? Why is my code not working?
- Duplicate slug/permalink issue while adding same post name
- Filter taxonomy by CPT
- Display related CPT with custom 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
- Define multiple prefixes for custom post type
- How to search through all child taxonomies using WP_Query?
- Taxonomies are not showing in the category dropdown
- Change custom post taxonomy values from front-end
- Display 3 level taxonomies
- List posts that have the current url taxonomy
- How to transfer categories (default) to custom taxonomy?
- Custom Taxonomy – fields
- Pages of my taxonomy terms are showing all posts
- Getting Custom Posts with Custom Taxonomy
- If custom taxonomy exist on post?
- How to get all posts assigned to a taxonomy term only?
- Error get_posts with Custom Taxonomy and OR relation
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- WordPress add taxonomies/terms list as a menu in archive page
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Custom post type post taxonomies
- insert a taxonomy for a custom post type
- Check if taxonomy is attached to at least one post in a post-type
- Custom posts and custom taxonomies for many products and categories?
- List custom taxonomy terms
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- Taxonomy listing issue – does not display how I would like
- Is it possible for post and custom post type to share a category base slug?
- Taxonomy Archive URL + Template