[wp-hackers] Using Sticky Posts in Custom Queries

Otto otto at ottodestruct.com
Tue Dec 20 21:00:11 UTC 2011


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


More information about the wp-hackers mailing list