What is your Custom Taxonomy name?
Try the following code, replace taxonomy_name
with whatever your actual taxonomy name is.
$args = array(
'suppress_filters' => false,
'numberposts' => -1,
'post_type' => 'resource',
'tax_query' => array(
array(
'taxonomy' => 'taxonomy_name',
'field' => 'slug', //Select taxonomy term by slug( you can also use name/id)
'terms' => 'term-slug/category -slug',
),
);
$the_query = new WP_Query( $args );
Related Posts:
- Get term slug of current post
- Create a shortcode to display custom post types with a specific taxonomy
- List the categories under custom taxonomy
- Custom Post Type and Taxonomy URL rewrite
- Permalink rewrite 404 conflict- WordPress Taxonomies/ CPT
- How to build a complex page structure
- wp_insert_term doesn’t work with custom post type’s taxonomy
- Populate Taxonomy from Custom Posts
- How to replicate some of Drupal Views functionality in WordPress?
- Archive page with multiple taxonomies rewrite
- 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
- Sorting for each custom taxonomy
- How to get_queried_object on multiple objects?
- How to get the parent’s taxonomy?
- Dynamic variable for custom taxonomy in loop?
- wp_insert_post custom taxonomy
- custom taxonomy – Template not working
- Count number of posts which exist in 2 taxonomies?
- Get URL for specific post type and current tag
- Append taxonomy terms as class names in markup?
- Want to turn WordPress into a paid subscription directory
- Removing Duplicate Custom Taxonomy Terms from within a Dropdown Select?
- 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 output wordpress custom tags separated by comma?
- Custom taxonomy template for multiple custom post types
- get_terms showing all categories instead of the ones assigned to a specific post
- Add/Remove current_page_parent class
- Does WordPress limit the length of slug names for Post Meta or Terms?
- Custom Taxonomy Permalinks Redirection
- Use different taxonomies in different custom post types’ permalinks?
- shortcode to show custom post types by category
- Single Template that can be applied only via URL
- wp_set_object_terms() not adding new term to custom post and custom taxonomy
- Search Custom Post Type & Taxonomies
- How to hook custom taxonomies to custom post types and make the permalinks work?
- Help need making decision. Ads rotating site on wordpress
- Categories of custom taxonomy don’t show any posts
- Displaying CPT and custom taxonomy side by side in Bootstrap 4 component
- Use Custom Post Type archive page for the taxonomies term archive page
- Is it possible to have dedicated page for parent/child taxonomy?
- Can a Custom Taxonomy be named “category” like normal Posts?
- How to use terms from the same custom taxonomy in different roles in a custom post type?
- Allow duplicate slugs for custom post type with taxonomies
- Display a grid of taxonomy terms at root taxonomy page
- Nested Custom Post Type or Custom Post Type Parents?
- Display Custom Taxonomy Alphabetically
- 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
- Deleting taxonomy terms and relationships on a custom post_type when a user is deleted
- How to display products name in a non-alphabetical order, in a custom field (taxonomy)?
- Taxonomy in URL
- Display related custom taxonomy posts in sidebar
- Different slug taxonomy for two different CPT
- Why does my taxonomy have a category style div id?
- Get taxonomy term by slug in post on archive page
- Query not work for current taxonomy
- Display a post from custom post type only if all the selected taxonomies and custom field value matches the record
- Hide custom post type from search based on custom taxonomy
- Custom Post type date archive for custom taxonomy
- Replicating category/location page heirarchy
- WordPress custom permalink and archive link for custom post type
- How to populate a Gravity Forms Custom Post Field (dropdown type) with custom taxonomy terms? [closed]
- Copy/Move selected taxonomy terms to another taxonomy for posts
- Non-permalink custom taxonomy not found
- Custom types, taxonomies and query optimization
- Looking up custom taxonomy IDs by name
- Query custom posts from custom taxonomy
- loop over all custom taxonomies for current custom post type and their values
- Correct way of adding taxonomy to a custom post type
- Multiple custom post type queries causing wrong post types to be grabbed in taxonomy + single templates?
- Change dynamically the dropdown list value
- CPT UI: Connect a custom post type to a custom post type
- WP Query tax_query not returning posts
- How to show terms used only for particular custom post type. Filter creation perpose
- How should i name the .php file to show custom posts under a taxonomy’s term?
- What’s the most efficient way to get two queries based on an if statement?
- How to hook save-post function to use taxonomy term in post-slug?
- Custom post type and taxonomies structure
- Form to custom post type and custom taxonomy
- Displaying custom posts in categories
- Best approach to allow front-end display of posts’ reviewers?
- Query pulling all taxonomies, not one I am specifying
- Custom Post Type rewrite url to /category/pagetitle [duplicate]
- Get archive of posts separated by taxonomies and subtaxonomies
- template structure for CPT not clear
- WordPress: insert a custom post type instance as an option for a custom taxonomy
- Trouble showing showing Posts related to custom post type and taxonomy.
- Post Editor: display categories from current post type taxonomy only?
- Show taxonomies from specific CPT
- Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy
- Category / Custom Post Type permalink issue
- Adding rewrite rules to Custom Post-type mixed with Taxonomy
- Loop through multiple custom taxonomy terms and display posts for a custom post type
- Inserting two categories
- How to manage a bookstore