# Tag count using blog controller and Pagination

**URL:** <https://forum.getkirby.com/t/tag-count-using-blog-controller-and-pagination/31314>\
**Category:** Questions\
**Tags:** v4\
**Created:** [April 6, 2024, 9:57am UTC](https://forum.getkirby.com/t/tag-count-using-blog-controller-and-pagination/31314 "2024-04-06T09:57:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Richard\_Kirby](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Richard\_Kirby](https://forum.getkirby.com/u/Richard_Kirby)\
**Post date:** [April 6, 2024, 9:57am UTC](https://forum.getkirby.com/t/tag-count-using-blog-controller-and-pagination/31314/1 "2024-04-06T09:57:59Z")

</div>

Greetings Folk,

my name is Richard and i am an Kirby CMS /PHP newbie.

I work since one year on my small Blog, witch i want do deploy this year.  
I writted already some tutorial in word and want to publish it this year on my website.

Kibry is great!

**Now i have some small problem/requirement.**  
**I made some Screenshots of the UI to explain my Problem.**

On my website i have an header and footer Element what is shown in every site of the small website. See picture down in the post.

**Now i want to show on every site all articels sorted by categorie filter. The problem is that i have an pagination and the filter shows only the articels of the actuell website. I hope iam detailed enough.**

How i can show all articel per Number in the FIlter on every site?

This is my code for the front-End: blog-Entry is my container for all articels.

```auto
<ul>
          <?php foreach($tags as $tag): ?>
            <li>
              <a href="<?= url($page->url(), ['params' => ['tag' => $tag]]) ?>">
                <?= html($tag) ?>
                <?= $blog_entry->filterBy('tags', $tag, ',')->count() ?>
              </a>
            </li>
          <?php endforeach ?>
        </ul>
      </nav>

```

Have any one an Idea?

![01_Tag-Filter in header of website](https://europe1.discourse-cdn.com/flex017/uploads/getkirby/original/2X/1/10bfaadfcf821f2aab405210017c4c97f5d82f7b.png)

---

<div class="post-metadata">

**Author:** ![Richard\_Kirby](https://avatars.discourse-cdn.com/v4/letter/r/f0a364/32.png) [@Richard\_Kirby](https://forum.getkirby.com/u/Richard_Kirby)\
**Post date:** [April 6, 2024, 10:51am UTC](https://forum.getkirby.com/t/tag-count-using-blog-controller-and-pagination/31314/2 "2024-04-06T10:51:51Z")

</div>

Hello there i got the solution : D.

I used the index function of kirby

```auto
$test = $page->index();

```

```auto
  <?= $test->filterBy('tags', $tag, ',')->count() ?>

```

Thanx - post can get closed.
