Question

I have the following query, trying to fetch the latest sticky posts but exclude the current one:

$sticky = get_option('sticky_posts');
rsort( $sticky );
$sticky = array_slice($sticky, 0, 3);

query_posts(
    array(
        'post__not_in' => array($post->ID),
        'post__in' => $sticky,
        'caller_get_posts' => 1,
    )
);

Getting the posts works fine, but post__not_in doesn't. Is there an effective way to do this?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top