# Same posts in home page and category pages

**URL:** <https://discourse.gohugo.io/t/same-posts-in-home-page-and-category-pages/43521>\
**Category:** support\
**Created:** [March 19, 2023, 3:40pm UTC](https://discourse.gohugo.io/t/same-posts-in-home-page-and-category-pages/43521 "2023-03-19T15:40:02Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![ansin218](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/ansin218/32/6991_2.png) [@ansin218](https://discourse.gohugo.io/u/ansin218)\
**Post date:** [March 19, 2023, 5:42pm UTC](https://discourse.gohugo.io/t/same-posts-in-home-page-and-category-pages/43521/5 "2023-03-19T17:42:50Z")

</div>

Thanks a lot @jmooring

For anyone else stumbling upon this page; the solution would be something like this:

```auto
{{ if eq .Kind "home" }}
.....whatever you want to do as per the home page......
{{ else }}
......something else you want to do on other pages.....
{{ end }}

```

Alternatively, you can also do it section-wise:  
`{{ if eq .Section "whatever-is-your-section" }}`

Another way, both my `index.html` and `list.html` were calling `post-list.html` file.

You can also create a `home-post-list.html` file that caters to `index.html` whereas the `post-list.html` file caters to `list.html` (sections for example).

Reference to Page Kinds:  
[https://gohugo.io/templates/section-templates/#page-kinds](https://gohugo.io/templates/section-templates/#page-kinds)

Other references:  
[https://discourse.gohugo.io/t/how-to-check-for-home-page/149/25?u=ansin218](https://discourse.gohugo.io/t/how-to-check-for-home-page/149/25)

---

_[View the full topic](https://discourse.gohugo.io/t/same-posts-in-home-page-and-category-pages/43521)._
