Tell us what you are trying to do?
[wpv-post-taxonomy type="location"] shows my top location and sub locations. I want one code to show only top location and another sub-location. I only have 2 levels of taxonomy. Please provide 2 separate shortcodes
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,
Please check our document:
https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-taxonomy
There isn't such an option within shortcode [wpv-post-taxonomy] to show only top location or only sub-location.
As a workaround, you can try with a nested view, for example:
1) Parent taxonomy view:
- Query terms of taxonomy "location"
- Filter by:
a) Taxonomy is set by the current post
b) Select taxonomy terms whose parent is None.
(It will be able to query all top level terms assigned by current post)
- in section "Loop Editor", display top level term's information + below child taxonomy view
2) Child taxonomy view:
- Query terms of taxonomy "location"
- Filter by:
a) Taxonomy is set by the current post
b) Select taxonomy terms whose parent is the value set by the parent view.
(It will be able to query all sub level terms assigned by current post)
- in section "Loop Editor", display top term's information
Then put the Parent taxonomy view's shortcode into a single post content, and test again