A new Siteleaf is here, upgrade to v2 →

Siteleaf

Menu

Group and exclude posts

Siteleaf v1 Docs » Theme Documentation » Tips and tricks » Group and exclude posts
{% assign featured_ids = '' %}

Featured:

{% for post in taxonomy['tags']['featured'].posts limit:4 %}
  {% assign featured_ids = featured_ids | append:',' | append:post.id %}
  <article class="featured">{{post.title}}</article>
{% endfor %}

Everything else:

{% for post in posts %}
  {% unless featured_ids contains post.id %}
    <article class="normal">{{post.title}}</article>
  {% endunless %}
{% endfor %}