Nested dynamic tags/Using looped term in repeater template

  • Solved
  • Posted 4 weeks ago

I have 9 terms which correspond to 9 Taxonomy types. And in a CPT, I have a repeater field where the subfields are each of the one taxonomies.

Taxonomy: Product Types: Meat, Dairy, Produce, etc
Taxonomy: Produce
Taxonomy: Meat
Taxonomy: Dairy

CPT: Farms
Taxonomy: Product Types
Repeater: Produce
– Taxonomy: Produce
– other fields for the one repeater item
Repeater: Dairy
– Taxonomy: Dairy
etc etc

Right now I have 9 containers which display depending on the Product Type terms selected. Within that container is the Repeater Loop.

But the content is basically the same other than the actual repeater term.

So I want to be able to create a master container that loops based on Product Types and pull the Product Types term into the sub repeaters, like

Instead of:

@post(produce.Variant) @post(produce.product.label) and then hide if there’s no Produce items
@post(dairy.Variant) @post(dairy.product.label)
@post(meat.Variant) @post(meat.product.label)

Do
@post(@post(category.label).Variant) @post(@post(category.label).product.label)

  • Images