[wp-testers] styling stick posts

Nathan Rice ncrice at gmail.com
Wed Nov 5 15:08:21 GMT 2008


Michael,
That works fine ... except that it will exclude sticky posts even if a
sticky post matches the parameters in the query_posts arguments, essentially
turning the sticky feature into an exclusionary tool (which is pretty much
the opposite of what it was meant for).

It seems like it would be easy enough to make sure that if query_posts or
WP_query is used, the stickyness of a post is rendered inconsequential. Or
at least make sticky posts play by the rules of the arguments.

Obviously, the sticky feature was only really meant to stick a post at the
top of a NORMAL loop, not necessarily custom loops.

What you're going to find from theme authors is us simply emptying out the
sticky posts ID array in order to keep our support requests down, which
would completely nullify the usefulness of the sticky feature.  If that's
what we have to do, though, then so be it.

Nathan

On 11/4/08, Michael Preuß <micha at dynamicinternet.eu> wrote:
>
> If you wont have a sticky post in your loop write:
>
> if(!is_sticky()) {
>   //youe code inside the_loop
> }
>
>


More information about the wp-testers mailing list