<% counter = 2 %> <% page.posts.forEach(function(post) { %> <% post.tags.data.forEach(function(tag) { %> <% if ( (tag.name == "Events") && (counter != 0) ) { %> <%- include('./../post_feed', { post: post, source: "index", event: counter }) %> <% counter = counter - 1 %> <% } %> <% }); %> <% }); %>