One OSTraining member asked us this question:
How can I set the filter criteria so that Views shows only the second level of a taxonomy?
We've had that question from other members before, so here's a tutorial explaining how it's done.
First, you need a taxonomy that has parent and child terms, as in this example:
Let's show you how to set up Views so that only the child terms show: Amphibians, Birds, Fish, Mammmals, Reptiles.
- Go to Structure > Views > Add new view.
- Create a View that shows "Taxonomy terms".
Thanks to Beth Binkovitz for the solution to this next step.
- Click "Add" next to Contextual Filters.
- Search for and choose "Taxonomy term: Parent term".
- Click "Apply (all displays)".
- Provide default value: check this box.
- Type: Fixed value
- Fixed value: enter the parent terms for your sub-terms
- Specify validation criteria: check this box.
- Validator: Taxonomy term.
- Vocabularies: Choose your vocabulary,
- Filter value type: Term name converted to term ID
- Click "Apply (all displays)" to finish.
- Save the filter and save your view.
- You should now see that the parent terms are ignored: