Order by issue
-
Hi,
I’ve the following code to display set items on a home page:<?php $args=array( 'orderby' =>'ID', 'order' =>'ASC', 'post_type' =>'page', 'posts_per_page' => '4', 'post__in' => array(8,61,40,81), ); $page_query = new WP_Query($args); ?> <?php while ($page_query->have_posts()) : $page_query->the_post(); ?>
I wish to display the order exactly as I’ve entered it, however, it keeps swapping the middle 2 around.
I use My Page Order plugin and have set them in the system as 1,2,3,4 so page 8=1,61=2,40=3,81=4 but even this doesn’t work.
Is there a way to sort this apart from doing the same code 4 time?
TIA
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Order by issue’ is closed to new replies.