Is There a Difference Between Taxonomies and Categories?

Taxonomies, as previously described are a collective noun for the following category post_tag post_format link_category custom taxonomy The first four are built-in taxonomies, while custom taxonomies are taxonomies that are manually created by the user with register_taxonomy. Custom Taxonomies can be hierarchical (like the build-in taxonomy category) or not (like post tags) The categories and … Read more

How to Get Current Custom Post Type Associated Taxonomy Term

// First, get associated taxonomies of the post/object. $object_taxonomies = get_object_taxonomies( get_post() ); // Next, get associated terms of the post/object. $object_terms = wp_get_object_terms( get_the_ID(), $object_taxonomies ); $terms = array(); // returned object terms could be WP_Error, so check that first. if( ! is_wp_error($object_terms) && is_array($object_terms) ) { foreach( $object_terms as $object_term ) { // … Read more

Display latest x posts from all categories in Custom Post Type/Taxonomy

The category parameters does not work with custom taxonomies. You need to use a tax_query instead. In your current code, replace (which is in any case also wrongly used, category_name takes the slug, not name) ‘category_name’ => $category->name with ‘post_type’ => ‘case-studies’, ‘tax_query’ => array( array( ‘taxonomy’ => $tax ‘terms’ => $category->term_id, ‘include_children’ => false … Read more