From your question I gather your taxonomy term names match your category names. If this is the case and always will be the case, why not just query your custom post type by category slugs? Not sure what the exact name is, so I just made it video
.
// get category slug
$cat = get_category( get_query_var( 'cat' ) );
$cat_slug = $cat->slug;
// query your custom post type (video?), assuming
// slugs match for your category name and taxonomy term name
$my_args = array(
'post_type' => 'video',
'tax_query' => array(
array(
'taxonomy' => 'your_taxonomy_name',
'field' => 'slug',
'terms' => $cat_slug
)
)
);
$my_query = new WP_Query($my_args);
while ($my_query->have_posts()) {
$my_query->the_post();
// do the usual thing
}
Related Posts:
- clients list using wordpress
- Find callback function for custom taxonomy metabox
- How do I add a custom post type to the Featured Content in twenty fourteen theme?
- Automatically assign a custom post to a custom taxonomy based on custom field value
- Limiting number of custom posts shown on taxonomy page
- Append taxonomy terms as class names in markup?
- How to retrieve category NAME instead of ID in a function with a taxonomy custom field?
- Insert HTML inside link in a walker
- Custom Taxonomy Permalinks Redirection
- Remove standard meta boxes from custom taxonomy
- Query taxonomy of taxonomy of custom post type
- How to rewrite url for any specific taxonomy?
- How to change permalink to include custom post type
- Add term to custom post type on draft
- Different Category system needed for the Custom Post Type
- Foreach loop returning more than one item when querying taxonomy
- Function to erase every post from a taxonomy
- Get Posts List of Current Selected Custom Taxonomy in Shortcode
- How to divide Subcategories into pages of parent category wordpress
- how to achieve this permalink abc.com/CPTName/CustomPostTypeCategorySlug/categoryname
- set object terms after some some time of published post – functions.php
- update custom taxonomy custom fields
- Check that a slug is present in the get_terms request
- Is there a way to use ‘publicly_queryable’ => false only on specific taxonomy term?
- Assigning categories to custom post types via a front-end form; only works for native post type
- CPT tags not showing when editing post
- Change Search display for Custom Post Type
- Recovering data about custom post and taxonomy types
- wordpress does not see the correct custom taxonomy hierarchy
- Post Custom & Taxonomy 404 error
- Getting a 404 on single custom post type page when using rewrite on a custom taxonomy
- Create 2-layered dropdown menus for custom taxonomy and custom post type
- Pagination fault in custom post type archive page [duplicate]
- Custom Loop for custom post type. Compare by meta_value?
- Invalid Taxonomy in template
- Custom Post Types using wrong template (index) instead of archive-{type}.php – previously worked as expected
- How do loop categories post from according in WordPress? is it impossible to solve this problem?
- How to use wp_set_object_terms depending on page ID?
- Is it possible to use a post name in a custom post slug?
- Mixing custom post type and taxonomy rewrite structures?
- Can multiple custom post types share a custom taxonomy?
- How to Add Custom Fields to a Custom Post Type?
- Display current taxonomy term when inside custom post type
- limit selection of custom taxonomies to one?
- $wp_query->queried_object->ID throws warning: Undefined property
- Custom Taxonomy Template Post List with Sort Order
- How can I add dropdown widget/box to admin post page?
- Post type archive page not working
- Help with hierarchical custom taxonomies and permalinks…almost there
- Archive or taxonomy pages not working for custom post type
- Custom Taxonomy returns no posts
- 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
- Custom/separate categories for custom post type
- Custom Post Type Pagination & duplicate posts
- Connecting a taxonomy with a post type
- Custom post types and permalinks
- Custom Post Types and independent Categories – complex Taxonomy
- Notice: Undefined index: suppress_filters
- get_post_meta returns empty array for terms
- Return one unique custom post type result when it shares a custom taxonomy in WP_QUERY?
- Display as tree terms of taxonomy and custom posts for each term of taxonomy
- Post count by month of taxonmy term
- Pretty URL for custom search for custom post type
- How to conditionally redirect to the post from a taxonomy page?
- First custom field value (out of several) displayed twice after query
- Custom while loop for hierarchical display of a taxonomy
- Grouping of CPTs and taxonomies into menu groups in admin
- set permalink for CPT
- Check if post has specific tag_ID in custom post type
- Global custom meta box
- custom post type vs. conditionally displaying meta boxes for specific terms?
- WP_query – Filter by tax_query and meta_query using multiple select
- Hide meta box for everything BUT a certain custom post type
- Display custom tags for custom post listing page
- How to display custom taxonomy term meta on custom post type
- What should I learn to develop event management in wordpress? [closed]
- Confusion about how to use Custom Post Types, Custom Taxonomy or Category?
- Displaying Posts Using a Custom Query with a Custom Field and a term_id
- Custom post type rewrite url structure with taxonomy and sub taxonomy
- Get taxonomy name used in a current post
- Custom Post Type with Category Separate
- 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?
- Custom permalink rewrite rules – how do I fix this?
- Create Inclusions and exclusions
- Associate custom CPT with another CPT’s taxonomy and rewrite permalinks
- Same permalink structure for all post types?
- WordPress custom post type
- How to have working breadcrumbs with several taxonomies associated with a custom post type
- Show Custom Post Type taxonomy term that matches custom field
- How to Display Custom Taxonomies in an Un-ordered HTML List
- link posts to custom post type
- how do I create a breadcrumb to work with multiple custom taxonomies
- 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
- Cannot attach custom taxonomy term to a custom post type. Post taxonomy terms are not saving