• Hi All,

    I have a category template set up for a specific category ID.

    It is set up to list the posts of the sub-categories which are group by each category using a foreach loop.

    However I’m now trying to introduce sticky posts and keep the grouping. Obviously the sticky posts now all appear at the top of the post listing.

    https://wordpress.pastebin.com/iwFTuhCM

    What am I doing wrong?

Viewing 2 replies - 1 through 2 (of 2 total)
  • query_posts(array('category__in'  =>array($cat->cat_ID),'caller_get_posts'=>1));

    well, I’m not reading clearly I think. What exactly are you trying to have this end up looking like? You want the stickies included, but do you still want them at the top, or do you just want them brought in, but in their natural order (by date, treated like anormal post)?

    The above code would bring the stickies in, but leave them in their natural order

    Thread Starter alexolder

    (@alexolder)

    I want them at the top of each category not at the top of everything.

    The code above pulls in the sub-categories of 3 and then loops through the posts in the sub-category, except the stickies get pulled to the top of everything not just the top of the category the code is looping through.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom Category page and Sticky problem’ is closed to new replies.