orderby => menu_order for values above 0
-
Using the following code to pull custom posts:
query_posts(array(‘paged’ => $paged, ‘posts_per_page’ => 9, ‘post_type’ => ‘gallery’, ‘cat’ => $catid, ‘orderby’ => ‘menu_order’, ‘order’ => ‘ASC’));
Unfortunately, this does not work properly if the order hasn’t been set (default is 0). Is there a way to push posts ordered 0 to the back of the list, or possibly change the default order value to something else (maybe 10000 or some other arbitrarily large number)?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘orderby => menu_order for values above 0’ is closed to new replies.