I've set up different post types with custom taxonomies and to code out a breadcrumb I need to have access to the terms of the post, the user is actually reading.
Note that my terms are hierarchical (like the categories) and that I need to display them in the hierarchical order in the breadcrumb.
I use the terms to categorize my posts. A user can navigate (navbar) to a site that display all the top level terms. He can then choose what he wants to read. If necessary (that differs from a top level term to another) he then is forwarded to another page that displays the child terms of the therm just chosen. After taking another choice he then sees the archive page that displays all the posts of that sub-term.
Now in the single.php
of that exact post I want a breadcrumb that displays the path the user went trough.
Home / My Posts / Parent / Child / Post1
The child is in italics because that's an optional term. For some posts there is only a top-level term.
Now to achieve this, I need a method to get these one or two therms when viewing the single.php
.
How can I do this?