I’m trying to display only the blogs where my Params.type is “news”, and not “notices”.
I’m displaying news like this:
{{ range first 2 (where .Site.Pages ".Params.type" "news") }}
and I thought of this:
{{ range first 2 (where .Site.Pages ".Params.type" "news") }}
{{ if ne .Params.categories "notices" }}
and it works! Only that instead of displaying one newspost, then noticing the next newspost in line is, instead, a “notice”, and move to the next post in line (which is a newspost and should be displayed), it displays the first post (news post), then a blank space.
;-D Yes, but if I do first 3 then it shows 3 instead of 2 when I only want 2 posts shown all the time.
If I do first 3, it shows 2, in THIS particular case, but if my next 3 posts are all News then it shows 3 posts on the page ;-( (only want/need 2 at all times)