How to get the singular Term name on term.html

I apologize if this is in the docs and/or easy to look up. I have been searching with no luck.

On the term.html page, how can I get the singular taxonomy name?

When looking at a term, I would like it to say “tag” or “category” above the .Title of the term.

I am using a single term.html with:

{{ define "main" }}
  <header>
    <p>(( would like this to say "Tag" or "Category" ))</p>
    <h1 class="t-h1">{{ .Title }}</h1>
  </header>
  ...
{{ end }}

Many thanks in advance!

I do this a lot … Solve my own answer right after posting … :man_facepalming:

<p>{{ .Data.Singular }}</p>

When I saw .Data, I just assumed it was related to the data/ directory or something. This is what I get for making stupid assumptions. :roll_eyes: :laughing:

1 Like

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