We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Hiding the most recent post because it is in the hero

Tyler Underwood April 11, 2019 by Tyler Underwood

I have the most recent post from my collection showing up in the hero and I don't want to double up on the post being shown on the archive page. There wasn't a modifier that seemed to fit this situation.

{{ collection from="{{ mount }}" limit="10" paginate="true" as="posts" sort="date:desc|title:desc" }}
<section class="wrap block archive">

    {{ if no_results }}
    <h3>There were no posts found.</h3>
    {{ /if }}

    {{ posts }}
    <article class="excerpt">
        <div class="post-intro">
            <a href="{{ url }}"><h3>{{ title }}</h3></a>
            <p>{{ post_intro }}</p>
        <div class="feat-img">
            {{ if featured_image }}<div class="bg-img" style="background-image: url('{{ featured_image }}');"></div>{{ /if }}
    {{ /posts }}

    {{ partial src="pagination" }}

</section> <!-- END posts -->
{{ /collection }}
Answered by Vitor Pinho!
>>>>>>> Answered <<<<<<<
2 Replies
1 Follower