ToolSet has a nice taxonomy filter option in Views of "Parent = none".
This will return the HIGHEST item in each taxonomy branch.
e.g. if a post is tagged as "Asia / Thailand / Bangkok" it would return the taxonomy term "Asia"
But actually I want to go in the opposite direction.
I want something like "Child = none".
Meaning that I want the LOWEST item in each taxonomy branch.
e.g. if a post is tagged as "Asia / Thailand / Bangkok" I want it to return "Bangkok.
Is there a way I can do this either with ToolSet native functions or with a Short Code custom taxonomy filter?
Hello,
There isn't such kind of feature within Toolset Views/Blocks plugin, see WP document:
https://developer.wordpress.org/reference/classes/wp_query/#taxonomy-parameters
include_children (boolean) – Whether or not to include children for hierarchical taxonomies. Defaults to true.
The parameter "include_children" will setup as true by default, so in your case, you just need to edit each post, assign it with only one lowest term, for example "Bangkok", and test again.
"The parameter "include_children" will setup as true by default, so in your case, you just need to edit each post, assign it with only one lowest term, for example "Bangkok", and test again."
Sorry. I can't understand what you are telling me to do here.
As I mentioned above, there isn't such kind of built-in feature within Toolset plugins to achieve what you want:
I want the LOWEST item in each taxonomy branch.
e.g. if a post is tagged as "Asia / Thailand / Bangkok" I want it to return "Bangkok.
You need to edit that post, assign it with only one term: Bangkok
Hope it is clear.
You can close the ticket.