[wp-hackers] Using Sticky Posts in Custom Queries

Matt Slocum mattslocum at sharefaith.com
Tue Dec 20 21:26:01 UTC 2011


So how do I tell a "category archive" query to use sticky posts?


On Tue, Dec 20, 2011 at 1:00 PM, Otto <otto at ottodestruct.com> wrote:

> On Tue, Dec 20, 2011 at 12:17 PM, Matt Slocum <mattslocum at sharefaith.com>
> wrote:
> > The query runs on the home page, so I can't figure out why they aren't
> > showing up on top.
>
> A custom query that is getting a category isn't a "home" query, it's a
> "category archive" query. So the is_home won't be set for that query,
> and sticky posts won't be automatically gotten.
>
> -Otto
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers
>


More information about the wp-hackers mailing list