Display categories with posts which have 2 selected separate taxonomies.
-
I’ve a custom post type named “New Machines”. I’ve also created 2 custom taxonomies. 1 called “new-machines_type” and the other “new_machines_brand”.
Example:
“new-machines_type” have the categories/terms: machines-1, machines-2, machines-3
“new_machines_brand” have the categories/terms: brand-1, brand-2.On the archive_new_machines.php, I’ve displayed all the terms/categories from “new_machines_type”.
Now the main thing is: On the taxonomy-new_machines_brand.php, I want to show only the terms/categories from new-machines_type which have selected the specific term from “new_machines_brand”.
So when I’m on the brand-1 page, I want only to show the categories/terms from “new_machines_type” which have posts inside with the term “brand-1”.
How can I achieve this?
- The topic ‘Display categories with posts which have 2 selected separate taxonomies.’ is closed to new replies.