[wp-hackers] Bug with post__in in WP 3.3.1?
Nícholas André
nicholas at iotecnologia.com.br
Wed Mar 14 16:58:23 UTC 2012
Hi guys, I trying to get the 'Sticky' Post, but i have an issue.
I have the code above:
sticky = get_option('sticky_posts');
$slidePosts = array_slice($sticky , 0,3);
$featuredPosts = array_slice($sticky , 4, 3);
$slide = new WP_Query(array('post__in' => $slidePosts));
if( $slide->have_posts() ) : while($slide->have_posts() ) :
$slide->the_post()
But I get all fixed posts, not the only that is in the array. If I remove
the 'post__in' the result is the same, but the order of the elements is
diffent( ordered by id), when i put it, the firsts elements are the
elements in the array $slidePosts, but it still showing all posts that are
fixed.
If I put post__in => array(54) for example, all the fixed posts are
retrivied and the post in array are the first;
Is somenthing that i'm doing wrong or this is a bug?
Complete Code:
http://pastebin.com/VKn4nXzC
Sorry for any mistakes on my english, i'm don't speak english very well.
--
Nícholas André
Técnico em Informática pelo IFRN
Graduando em Ciência da Computação - UFERSA
Blog : www.iotecnologia.com.br
Linux user number #478230.
More information about the wp-hackers
mailing list