I have a taxonomy view which appears inside a search view. The search is showing posts, the taxonomy view in it is showing, separately, the taxonomy matching the current search term.
for example, searching for "wheels" will show all posts with "wheels" in the title, and also all taxonomies with "wheels" in the title.
so far so good, everything works.
what i want now is, inside the taxonomy view, to show not only the taxonomy name, but also it's parent (if it has one). the reason is I can have 2 taxonomies called "wheels", but the first's parent would be "objects" and the second's parent would be "circles" (just an example, these are not the actual names...), so I need to show that the first "wheels" is the child of "objects" and the second is the child of "circles"
i know i can create another taxonomy view with filter of "parents" set to "none", thus displaying the top taxonomies in the hierarchy, but I need to also relate it to the current taxonomy, which i can't get my head around...
thx!
The attribute "term_id" expects the target term's ID which is passed using the shortcode "[wpv-taxonomy-id]" and the attribute "taxonomy" expects the slug of the target taxonomy, which in this example is "category".
Note: The custom code examples from our forum are shared to get you started in the right direction. You're welcome to adjust them as needed and for more personalized customization assistance, you can consider hiring a professional from our list of recommended contractors: https://toolset.com/contractors/