Articles of custom taxonomy

Date-based permalinks for Custom Post Type, and custom taxonomy permalinks

In my theme (a child of Twenty Sixteen) I’ve created a new Custom Post Type, pg_review. I’ve associated two custom taxonomies with it, pg_genres (hierarchical categories), and pg_authors (like tags). Everything is working fine except permalinks… Despite trying to understand and adapt various examples I’m going round in circles. I would like these permalinks to […]

Using Advanced Custom Fields Relationship Field to select a taxonomy term

I have a site where I’ve got a post type called ‘small banners’ which are basically adverts that i need to call on normal pages (This is fine, I’ve done this) but I also need to use this functionality on a Taxonomy term. ACF doesn’t have the functionality to select taxonomy terms themselves just to […]

Show category and tag link as a submenu under custom post type submenu

I have created a college management menu in admin, under that i have added some sub menus those submenus are of different post types. Those were working fine. But Category and tags are not showing as sub-sub-menu under custom post types College Management /* Main menu */ — Faculty /* Sub menu Custom post type […]

How to make custom taxonomy check boxes like 'Categories'

Right now I have a custom taxonomy for my custom post type case_study. Everything is working just find except for the fact that when creating a new post and adding a Taxonomy, it’s “tags” and i was looking to do what Posts do with their category (the checkbox). Is there anyway I can do that […]

How to get Custom Taxonomy ID from the post ID

In my setup, I have two custom taxonomy called Regions & Sections. All the post in site can either be from region taxonomy or from section taxonomy. At certain point outside the loop I have the post details and I need the taxonomy ID. I don’t have the taxonomy name at that point to use […]

Display Custom Post Types Glossary

I have a custom Post Type called as “Book” and I want to display a “Glossary” on my home page like – ‘A B C D E F…’ so that they can be linked to a page on my website as – http://example.com/c-books or http://example.com/b-books for “C” & “B” letters respectively. I have seen this […]

Display hierarchical subterms of custom taxonomy based on depth

There is the following hierarchical taxonomy structure of a specific post: Term A SubTerm A.1 SubTerm A.2 SubTerm A.2.1 Term B SubTerm B.1 SubTerm B.1.1 SubTerm B.1.2 How to display all parent terms (result: A, B) all second level terms (result: A.1, A.2, B.1) all third level terms (result: A.2.1, B.1.1, B.1.2)

Count number of posts which exist in 2 taxonomies?

I know I can use something like this to count for ONE tax: $catcount=get_term_by(‘slug’,’apple’, ‘FRUIT’); echo $catcount->count; but not sure how to count posts that are in combos between taxonomies… I have two custom taxonomies, and I want to count the number of posts (custom post types, actually) that are in each pair match between […]

How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)

I need to get ONLY the term (not all terms) of Current Custom Post Type. For example I have a Custom Post type called movies and have a Taxonomy called Genre which has some terms like comedy, action,… now in current post I need to get the used term? $args = array( ‘post_type’ => ‘movies’, […]

How to list the taxonomy terms that fit the custom query?

Can’t seem to find an answer to this on the web so I’m trying here… I’m running a custom query where I return all the recipes that match specific ingredients (custom taxonomy used here). $ingredients = array(‘poulet’, ‘oignon’, ‘piment’, ‘tomate’); $type = ‘souper’; $args = array( ‘post_type’ => ‘recipe’, ‘tax_query’ => array( array( ‘taxonomy’ => […]