Listing Taxonomy with Spaces

I have created a taxonomy… product-category = “product-categories”

I’m having a hard time pulling any 2 word taxonomies through. Anybody know how I can pull a list of taxonomy with spaces? This is what I have and is not working.

             {{ range $product_categories, $taxonomy := .Site.Taxonomies "product-categories" }}
        <a href="/product-categories{{ $product_categories | urlize | relURL }}" class="category__item" class="secondary-btn">{{ $product_categories | humanize }} ({{ $taxonomy.Count }})</a>

You can use index function.

{{ range $product_categories, $taxonomy := index .Site.Taxonomies "product-categories" }}
1 Like

Thank you! I tried that before and it didn’t work. Tried it again, and realized I had a underscore still for the name value in the Forestry :sweat_smile:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.