# Display the amount of pages that are on a category page

**URL:** https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913
**Category:** support
**Tags:** taxonomy
**Created:** [August 9, 2022, 3:12pm UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913 "2022-08-09T15:12:36Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![mickel1982](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mickel1982](https://discourse.gohugo.io/u/mickel1982)
#### Post date: [August 9, 2022, 3:12pm UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913/1 "2022-08-09T15:12:36Z")

</div>

Hi,

How to display the amount of pages/articles that are on a category page?

I just want a way to easily and quickly see how many pages are on a category page.

---

<div class="post-metadata">

### Author: ![idarek](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/idarek/32/26229_2.png) [@idarek](https://discourse.gohugo.io/u/idarek)
#### Post date: [August 9, 2022, 3:21pm UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913/2 "2022-08-09T15:21:55Z")

</div>

Here you are

```auto
<div class="list-of-categories">
  {{ range .Site.Taxonomies.categories.ByCount }}
    <span><a href="{{ .Page.Permalink }}">{{ .Page.Title | upper }}</a> <sup>{{ .Count }}</sup></span>
  {{ end }}
</div>

```

---

<div class="post-metadata">

### Author: ![tut](https://avatars.discourse-cdn.com/v4/letter/t/e95f7d/32.png) [@tut](https://discourse.gohugo.io/u/tut)
#### Post date: [August 9, 2022, 3:24pm UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913/3 "2022-08-09T15:24:27Z")

</div>

```auto
<ul class="categories">
  {{ range .Site.Taxonomies.categories.ByCount }}
     <li>
       <a href="{{ .Page.Permalink }}">{{ .Page.Title }}</a> <small>({{.Count }})</small>
     </li>
   {{ end }}
</ul>

```

---

<div class="post-metadata">

### Author: ![mickel1982](https://avatars.discourse-cdn.com/v4/letter/m/f14d63/32.png) [@mickel1982](https://discourse.gohugo.io/u/mickel1982)
#### Post date: [August 11, 2022, 9:41am UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913/4 "2022-08-11T09:41:05Z")

</div>

> [@mickel1982](#):
>
> how many pages are on a category page

Thank you for your answers.

I use the following solution:

```auto
<h1>{{ .Title }}</h1>
<p>{{ printf "%d articles" (len .Pages)}}</p>
<hr>
{{ range .Pages }}<p><a href="{{ .Permalink }}">{{ .Title }}</a><br>{{ if .Params.date }}<span class="date">{{.Date.Format "02 Jan 2006"}}</span>{{ end }}{{ if .Description }}<br>{{ .Description }}{{ end }}</p><hr>
{{ end -}}

```

I found this solution here: [https://discourse.gohugo.io/t/count-number-of-pages-matching-a-term-in-a-page-of-kind-term-taxonomy-html/35376/2](https://discourse.gohugo.io/t/count-number-of-pages-matching-a-term-in-a-page-of-kind-term-taxonomy-html/35376/2)

---

<div class="post-metadata">

### Author: ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)
#### Post date: [August 13, 2022, 9:41am UTC](https://discourse.gohugo.io/t/display-the-amount-of-pages-that-are-on-a-category-page/39913/5 "2022-08-13T09:41:46Z")

</div>

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