First, you do not need to use the where
function to get a term’s weighted pages.
{{ range $term, $weightedPages := .Site.Taxonomies.categories }}
<h2>{{ $term }}</h2>
{{ range . }}
<h3><a href="{{ .RelPermalink }}">{{ .LinkTitle }}</a></h3>
{{ end }}
{{ end }}
Second, your existing code is functional with my test data and with my content structure and with my layout structure. I have no idea what your site looks like.
You are more likely to receive a prompt and accurate response if you post a link to the public repository for your project.
See https://discourse.gohugo.io/t/requesting-help/9132.
Let us see your code
Include a link to the source code repository of your project, because we really need the context of seeing your templates and partials to be able to help you. It is trivial to do a quick
git clone
on your repo, then runhugo server
in your project, to help you out. On the other hand, recreating your code from screenshots, or sort of guessing at it, is not.If you can’t share your repository for whatever reason, consider creating a dummy repo that you can share, which reproduces the problem you’re experiencing.