Problem with taxonomies levels

Hello,

I have taxonomies on 3 levels:
_ level 1
__ level 2
___ level 3

I want to display level 2 children but not level 3.
Here is my code:

<Loop type=taxonomy_term taxonomy=locations parents=true orderby=count>
    <Field title /> /* -> OK - Display level 1 */
      <Loop field=children>
          <Field title /> /* -> NOK - Display levels 2 & 3 but I want ONLY level 2 */
      </Loop>
</Loop>

What is wrong or missing?
Thanks

Instead of <Loop field=children>, give this a try:

<Loop type=taxonomy_term taxonomy=category parent="{Field id}">

Let me know if you’re unclear on how that works.

2 Likes

Hello Benjamin,
Thank you for your answer, it works :slight_smile:

1 Like