Cant get .IsHome work properly with where

Hi!

I want to hide all posts in the list template except when I’m at home, this is hiding all posts even when I’m NOT at home!:

{{ $paginator := .Paginate (where (where .Pages.ByDate.Reverse "Section" "eq" "post" ) .IsHome "eq" "false")}} {{ partial "pagination.html" . }} {{ range $paginator.Pages}}

Any tips? Thanks!

From the way I see it, the .IsHome variable is mostly used with a conditional like this:

{{ if .IsHome }}
  <!-- Do your thing here if it's the homepage. -->
{{ end }}

You need to do .Kind "eq" "home"

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