Display only one entry with checkbox checked in my pagination loop? I have multiple entries in 'blog' that have the 'featurePost' checkbox field checked. I want to display ONLY the latest, but this code is displaying multiple fields.

{% paginate craft.entries({ section: 'blog', order: 'featurePost desc, postDate desc', limit: 5 }) as entriesOnPage %}

{% for entry in entriesOnPage %}
    {% if craft.entries.section('blog').featurePost.limit(1) | length %}
        &lt;article class="flex-container-small {{ entry.featurePost | length ? 'pinned' }}"&gt;
    {% else %}
        &lt;article class="flex-container-small"&gt;
    {% endif %}
{% endfor %}

{% include "partials/blog/_blog-pagination" %}

{% endpaginate %}
This should show all entries, paginated, with featured posts at the start, but not pinned to the top of each page.

{% paginate craft.entries({ section: 'blog', order: 'featurePost desc, postDate desc', limit: 5 }) as entriesOnPage %}

    {% for entry in entriesOnPage %}
        &lt;article class="flex-container-small{% if entry.featurePost %} pinned{% endif %}"&gt;
    {% endfor %}

    {% include "partials/blog/_blog-pagination" %}

{% endpaginate %}


Ordering by featurePost is good, but you can perform the check a lot more simply.