Sticky Post in Category (2 posts)

  1. David Jones
    Posted 5 years ago #

    I have done some extensive searching to get a sticky post to show on top in a category archive and have come close to cracking the nut. But I never got the full solution.

    I have two different categories templates
    1. category-building-science.php
    2. category-social-solutions.php

    And I want the ability to have a sticky post at the top of the category and then just have the rest of the posts flow naturally.


    I know this just returns the sticky post, but how do I get just the rest of the category to follow?

  2. vtxyzzy
    Posted 5 years ago #

    Use a second loop with this query:


    You probably want to include the category selection in both queries so you only get stickies in the category, and then only get the other posts in the category.

Topic Closed

This topic has been closed to new replies.

About this Topic