[wp-testers] styling stick posts

Otto otto at ottodestruct.com
Wed Nov 5 19:44:55 GMT 2008


Just add caller_get_posts=1 to your custom query, and you won't
autoget the stickies anymore.

caller_get_posts is not documented yet, but essentially it's what
prevents the get_posts() calls from getting sticky posts. It'll work
if you use it directly too.



On Wed, Nov 5, 2008 at 9:08 AM, Nathan Rice <ncrice at gmail.com> wrote:
> 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
>> }
>>
>>
> _______________________________________________
> wp-testers mailing list
> wp-testers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-testers
>


More information about the wp-testers mailing list