<% counter = 3 %> <% page.posts.forEach(function(post) { %> <% if (counter != 0) { %> <% isEvent = false %> <% post.tags.data.forEach(function(tag) { %> <% if (tag.name == "Events") { %> <% isEvent = true %> <% } %> <% }); %> <% if (isEvent == false) { %> <%- include('./../post_feed', { post: post }) %> <% counter = counter - 1 %> <% } %> <% } %> <% }); %>