problem with query_posts and post__in
-
Hello,
I’m having some trouble using query_posts() with post__in.
here is a simple example :
Let says I have only 5 posts in my blog and I want them in this order on my homepage : 3, 4, 1, 2 and 5.
From the codex, if I want to return posts ordered my way, I should use :<?php query_posts(array('post__in'=> array(3,4,1,2,5))); ?> <?php while (have_posts()) : the_post(); ?>
but nothing happens, my homepage just return my 5 posts without taking care of my special order (they are ordered by date as default).
Then I tried this to check if query_posts was actually doing something on posts fetched for homepage, and it does work actually :
<?php query_posts('p=5'); ?> <?php while (have_posts()) : the_post(); ?>
So is there any problem with post__in or am I missing something here ?
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘problem with query_posts and post__in’ is closed to new replies.