Tell us what you are trying to do?
I have some custom taxonomies for my custom post type. There are 20 different taxonomies/categories.
I understand how to list all the categories on the front end that have been chosen. Is there a way to show the categories that NOT have been chosen? Think if it like this .....
Custom Post Type: CARS
Custom Taxonomies/Categories: CAR OPTIONS
Front End Display users would see:
Here are the car options you have chosen:
Heated Seats, Satellite Radio, Rear View Camera, Red Paint
(the above are the Taxonomies/Categories that were chosen, displayed to the user)
Here are the car options you did not choose:
Bigger Engine, Bigger Tires, Sunroof, Turbo
(the above are the Taxonomies/Categories that WERE NOT chosen, displayed to the user)
Is this possible to do ?
Is there any documentation that you are following?
Is there a similar example that we can see?
What is the link to your site?
Hello,
For the problem: Is there a way to show the categories that NOT have been chosen?
It is possible with a taxonomy view, within view's loop, you can use [wpv-conditional] shortcode to check if current post does not have this specific term, then display this term information, for example:
in a single "CARS" post:
1) Dashboard-> Toolset-> Settings-> Front-end Content
option "Functions inside conditional evaluations", add function name: has_term
2) Create a taxonomy view, query term of taxonomy "CAR OPTIONS", no other filter
3) in the view's loop display the term link like this:
[wpv-conditional if="( has_term('[wpv-taxonomy-slug]', 'category', '[wpv-post-id]')) " ]
[wpv-taxonomy-link]
[/wpv-conditional]
More help:
https://toolset.com/documentation/user-guides/conditional-html-output-in-views/using-custom-functions-in-conditions/
https://codex.wordpress.org/Function_Reference/has_term