0

I have created a new vocabulary with some extra fields and these taxonomy terms.

  • Parent 1

    • Child 1.1
    • Child 1.2
    • Child 1.3
  • Parent 2

    • Child 2.1
    • Child 2.2
    • Child 2.3
  • Parent 3

  • Parent 4

  • Parent 5

In the parent category page, how can I show child categories with images or other custom fields?

1 Answer 1

0

The way terms are related is from child towards parent, not parent towards child.

So you need to start with taxonomy term views (Block Views Display) showing all the terms, filter them according to Parent term to only show children terms, this will show all of them, no matter what parent, but will not show parents (because they don't have parents of their own).

You can directly add any custom fields you have on the terms because this is a term type Views.

Then add a contextual filter for the Parent term, (Provide Default Value, from URL context).

When you place the Block on the page of the Parent term (don't forget to set the Block filter option) it will automatically filter it to show only the children terms of that parent.

This may need a bit different solution if Block is to be placed on a node Views type. Node type will already have a contextual filter for terms and the additional contextual filter for child terms will have to work together with it.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.