Show 5 random posts?

Hello everyone,
I am trying to show 5 random posts but can’t seem to get it to show 5 random posts from all news posts, only shows the first five and does a random of that since first is added:

{{ range first 5 (where .Pages "Type" "news") | shuffle }}

How can I get it to choose 5 from the entire need content type ?

Thank you in advance


Try wrapping the where + shuffle in parentheses:

{{ range first 5 ( (where .Pages "Type" "news") | shuffle ) }}

Genius! This worked, thank you so much, happy new year!