How to add up the total params value from the section

If I understand correctly you currently redefine $fundCount every time as 0 when you go through the pages.

Maybe try something like that:

{{ $fundCount := 0 }}
{{ range (where .Data.Pages "Type" "project") }}
    {{ $fund := .Params.raised_fund }}
    {{ $fundCount = add $fundCount $fund }}
{{ end }}
<span>Total Fund:</span> {{ $fundCount }}

And please explicitly check that you are using 0.48 by typing hugo version, since some packages are not yet updated.

1 Like