You can do like following
$thiscat = $wp_query->get_queried_object();//put this code
$args = array(
'post_type' => 'sports',
'tax_query' => array(
array(
'taxonomy' => 'sports_category',
'field' => 'slug',
'terms' => $thiscat->slug // Pass this to slug
),
),
);
$myquery = new WP_Query($args);
then you can able to fetch post titles tagged under football and basketball separately on same page.
Related Posts:
- query multiple taxonomies
- Sort the main query in subcategories/terms?
- Filtering WP_Query Dynamically on the Front-End
- WordPress loop: Show only a Custom Post Type Taxononmy TERM
- Query for specific taxonomy that executes a particular loop depending on volume of posts?
- display post count in archive page that have relation with another taxonomy term
- Display all Custom taxonomy terms and their relevant custom posts
- Get posts of an specific term of a custom taxonomy
- How to Get The Taxonomy Term in Custom Post Type Loop Inside a Wp Query
- Get The Post Type A Taxonomy Is Attached To
- How to limit the number of terms (terms acts like categories)
- Custom Taxonomies Terms as Post Title for Custom Post Types upon Publishing
- Counting Posts of a Given Post Type Having a Specific Taxonomy?
- Not Able to Insert Taxonomy Term Using wp_insert_post()
- WP_Query -> sort results by relevance (= most tags / taxonomy terms in common)
- array_pop() expects array, boolean given for $event_type_term ->slug
- how to group custom post type posts by custom taxonomy terms
- Displaying Posts Related to Other Posts by a Taxonomy Term?
- Displaying custom post type by first letter through custom taxonomy
- Querying Posts by Taxonomy From Alternate Network Site
- Trouble adding custom featured image for custom taxonomy TERMS
- Get child terms of current term of the current post
- Should unaltered default loop/query return a list of custom posts belonging to a custom taxonomy?
- List all custom post type posts from a given category?
- Creating a function that receives the taxonomy terms that have been changed in a custom post type
- Query for posts in 2 taxonomies
- Get the terms of a custom taxonomy for a specific author in author template
- Paginated Taxonomy Term Archive including one post per term
- How to get posts from multiple custom post types according to it’s custom taxonomy terms?
- Is it possible to create a shortcode that will query a post based on taxonomies?
- wp_query to find posts by year and month
- Querying Term Posts in Loop
- Custom Post Type Loop within Shortcode
- Displaying a custom post types custom taxonomy value?
- Display CPT posts based on specific taxonomy
- Update post terms with custom taxonomy
- Why get_posts() not returning only selected category posts from Custom Post Type?
- Get template part using a custom taxonomy term
- How to restrict users and admin from creating new taxonomy terms?
- Displaying custom taxonomy in the admin list of a custom post type
- Which post does a taxonomy term belongs to?
- How do I display the taxonomy term alongside the post type post title?
- Custom post taxonomies as tax_query terms?
- Custom WP Query on custom meta and sort by multiple meta keys value
- Custom taxonomies relationship
- How do I display the taxonomy for a custom post type in an array
- How do I require the specification of term in a custom post type and custom taxonomy?
- Custom Post, set object Taxonomy terms in plugin
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Add Custom Post Type of specific Custom Taxonomy to regularly blog loop
- Display taxonomy terms, child terms and posts in a template
- Use custom walker to add taxonomy terms to main nav menu
- WP_Query orderby and tax_query
- Add term to custom post type on draft
- How to get WordPress term attached to the Post?
- Get parent category id from child category page for custom taxonomy
- WordPress wp_query() basic question about args
- How to get only child terms from a custom taxonomy of current post type?
- Custom post type, custom taxonomy, query posts only from taxonomy (children of)
- how to get this tax_query working?
- The Difference Between Categories and Tags and Taxonomies and Terms
- How to get the post terms from a child taxonomy
- display posts of custom post type with custom taxonomy
- Custom post type and custom taxonomy 404 on page 2
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Exclude latest post from WP_Query taxonomy term loop
- Commas not displaying in implode
- How can I get 3 different taxonomy type terms in a div class element?
- Get terms for a specfic post from multiple taxonomies in custom post type
- WP_Query order custom post type with certain meta key value by post modified date
- Cant’ Display Custom Post Type Title Base on Tax Terms
- Using get_terms() to list terms from one custom taxonomy AND from one specific built-in category
- set object terms after some some time of published post – functions.php
- Sort custom posts by date and then by taxonomy
- How to search through all child taxonomies using WP_Query?
- Change the term based on the value of a $variable using wp_update_post in submitting a form
- Get all posts for custom taxonomy term
- posts_per_page is not working by term
- WP_query sort by taxonomy
- Dropwdown: Get taxonomy terms from posts that share preselected terms from 3 other taxonomies
- Custom Post Type / Taxonomy / Term – what template to use to avoid 404-page?
- Display title of all custom posts from same taxonomy term on a custom post template
- wordpress does not see the correct custom taxonomy hierarchy
- Get category list & taxonomy list from different post type using post id?
- Why get_posts() returns empty array while I am trying to get posts from some specific taxonomies and work properly with others?
- WordPress add taxonomies/terms list as a menu in archive page
- Hide Custom Taxonomy title if not associated with another Custom Taxomony
- WP_Query for CPT with filter by another WP_Query
- Fetch posts list from fist CPT taxonomy term and list under 2. CPT
- How to query posts by meta keys AND under specific category?
- Shortcode display CPT Query only showing 1 post?
- How to List CPTs Under One Tax Term
- Get a list of categories ids
- Storing/querying custom date data
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- Catergory args causing loop not to show
- List custom taxonomy terms
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- WP Query Conditionally query meta and taxonomy