# How to get permalink of Taxonomies in templates?

**URL:** <https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927>\
**Category:** support\
**Created:** [July 13, 2018, 11:16pm UTC](https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927 "2018-07-13T23:16:59Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![parsiya](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/parsiya/32/1218_2.png) [@parsiya](https://discourse.gohugo.io/u/parsiya)\
**Post date:** [September 24, 2019, 3:27am UTC](https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927/21 "2019-09-24T03:27:51Z")

</div>

> [@vassudanagunta](#):
>
> If [Pull Request #4796](https://github.com/gohugoio/hugo/pull/4796) is merged, then you won’t need to hardcode anymore. You could use
> 
> ```auto
> {{% relref "tags" %}}
> 
> ```

Apologies for reviving this thread but by looking at your post I realized I can point to specific taxonomy pages using `relref` from inside my markdown content. I think it’s a useful feature that is missing from the [Links and cross references | Hugo](https://gohugo.io/content-management/cross-references/) page.

E.g., link to specific tag `{{< relref "tags/some-tag" >}}` or taxonomy `{{< relref "categories/some-category" >}}`.

---

<div class="post-metadata">

**Author:** ![nish](https://avatars.discourse-cdn.com/v4/letter/n/9dc877/32.png) [@nish](https://discourse.gohugo.io/u/nish)\
**Post date:** [January 11, 2021, 11:52am UTC](https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927/22 "2021-01-11T11:52:50Z")

</div>

You could do something like this…

```
{{ $categories := .Params.categories }}
{{ $all_categories := .Site.Taxonomies.categories }}
{{ with $categories }}
	{{- range $all_categories -}}
		{{ if in $categories .Page.Title }}
		<a href="{{- .Page.Permalink -}}">{{ .Page.Title }}</a>
		{{ end }}
	{{- end }}
{{ end }}
```

---

<div class="post-metadata">

**Author:** ![alexandros](https://avatars.discourse-cdn.com/v4/letter/a/ecc23a/32.png) [@alexandros](https://discourse.gohugo.io/u/alexandros)\
**Post date:** [January 11, 2021, 11:55am UTC](https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927/23 "2021-01-11T11:55:07Z")

</div>



[Previous page](https://discourse.gohugo.io/t/how-to-get-permalink-of-taxonomies-in-templates/12927.md?page=1)
