# Limit function to first page of homepage

**URL:** <https://discourse.gohugo.io/t/limit-function-to-first-page-of-homepage/35783>\
**Category:** support\
**Created:** [November 27, 2021, 2:05pm UTC](https://discourse.gohugo.io/t/limit-function-to-first-page-of-homepage/35783 "2021-11-27T14:05:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![esawertu](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@esawertu](https://discourse.gohugo.io/u/esawertu)\
**Post date:** [November 27, 2021, 2:05pm UTC](https://discourse.gohugo.io/t/limit-function-to-first-page-of-homepage/35783/1 "2021-11-27T14:05:07Z")

</div>

Is there a way to limit something on the first page of the homepage only using `isHome`?

```auto
{{ if .IsHome }}
	// content for first page only goes here 
{{ else }}
   // content for whole site including paginated pages from page 2 of homepage
{{ end }}

```

---

<div class="post-metadata">

**Author:** ![esawertu](https://avatars.discourse-cdn.com/v4/letter/e/94ad74/32.png) [@esawertu](https://discourse.gohugo.io/u/esawertu)\
**Post date:** [January 29, 2022, 10:28am UTC](https://discourse.gohugo.io/t/limit-function-to-first-page-of-homepage/35783/2 "2022-01-29T10:28:44Z")

</div>

```auto
 {{ if not $paginator.HasPrev }}
             // content goes here
           {{end}}

```

---

<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:** [January 31, 2022, 10:29am UTC](https://discourse.gohugo.io/t/limit-function-to-first-page-of-homepage/35783/3 "2022-01-31T10:29:36Z")

</div>

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