Collect items from 2 differents sections

I have the following code for collecting items from “news” section.

<div>
{{ range first 6 (where .Site.RegularPages "Section" "news") }}
<div><a href="#{{ cond (in (.Title|urlize) "%") (.Title | base64Encode) (.Title) | urlize }}">{{ .Title }}</a></div>
{{ end }}
</div>

How to modify the above code to collect also items form an other section (i.e. news and events)

{{ range first 6 (where .Site.RegularPages "Section" "in" (slice "news" "events") }}

1 Like

It works perfectly.
Thank you

1 Like

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