# Problem with RegularPages

**URL:** <https://discourse.gohugo.io/t/problem-with-regularpages/23325>\
**Category:** support\
**Created:** [February 8, 2020, 1:17pm UTC](https://discourse.gohugo.io/t/problem-with-regularpages/23325 "2020-02-08T13:17:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![billthefarmer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/billthefarmer/32/3932_2.png) [@billthefarmer](https://discourse.gohugo.io/u/billthefarmer)\
**Post date:** [February 8, 2020, 1:17pm UTC](https://discourse.gohugo.io/t/problem-with-regularpages/23325/1 "2020-02-08T13:17:01Z")

</div>

I have a blog using the no longer supported theme theme-hugo-foundation6. I have a repository of the theme as last updated here [GitHub - billthefarmer/theme-hugo-foundation6](https://github.com/billthefarmer/theme-hugo-foundation6). The sources for the blog are here [blog/blog at master · billthefarmer/blog · GitHub](https://github.com/billthefarmer/blog/tree/master/blog). the blog is here [Bill Farmer](https://billthefarmer.github.io/blog). I have fixed a few minor problems with the theme as they were flagged up but the changes introduced in Hugo 0.57 have broken the main page and I can’t work out how to fix it. The baseof.html file contains:

 {{ block "main" . }} {{ end }} 
 {{ partial "sidebar.html" . }} 

The list.html file contains:

```
{{ define "main" }}

{{ $paginator := .Paginate (where .Data.Pages "Type" "post") }}
{{ range $paginator.Pages }}
  {{ .Render "summary" }}
{{ end }}

```

This works fine for category pages, but not the main page. I realise I should be using site.RegularPages or .Site.RegularPages but I can’t work out where or how.

---

<div class="post-metadata">

**Author:** ![regis](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/regis/32/4958_2.png) [@regis](https://discourse.gohugo.io/u/regis)\
**Post date:** [February 8, 2020, 4:06pm UTC](https://discourse.gohugo.io/t/problem-with-regularpages/23325/2 "2020-02-08T16:06:19Z")

</div>

Homepage’s `.Pages` only holds root sections, so try this:

```auto
{{ $pages := .Pages }}
{{ if .IsHome }}
  {{ $pages = site.RegularPages }}
{{ end }}
{{ $paginator := .Paginate (where $pages "Type" "post") }}

```

---

<div class="post-metadata">

**Author:** ![billthefarmer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/billthefarmer/32/3932_2.png) [@billthefarmer](https://discourse.gohugo.io/u/billthefarmer)\
**Post date:** [February 8, 2020, 4:38pm UTC](https://discourse.gohugo.io/t/problem-with-regularpages/23325/3 "2020-02-08T16:38:40Z")

</div>

Thank you, that works fine

---

<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:** [April 14, 2023, 3:58pm UTC](https://discourse.gohugo.io/t/problem-with-regularpages/23325/4 "2023-04-14T15:58:05Z")

</div>

Closed on April 14, 2023, 3:58pm UTC

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