How to get_posts where 'menu_order' is more than 0/zero?
Is it possible to get posts where menu_order is more than 0? I have tried this argument when I get_posts()
but it doesn't have any effect at all:
'meta_query' = array(
'key' = 'menu_order'
, 'value' = '0'
, 'compare' = ''
)
What I'm after in the first place is to treat menu_order 0 as last priority, or "specific menu_order not set" so that if I set a post to 1 or 2 as menu_order. Those posts will be looped out before everyone with 0. I should say, all of this with ASC as orderby of course.
And I can't see any other WordPress-way to do it than have two get_posts()
after each other and in the first one exclude all posts with menu_order 0 and in the second only get these ones.
But to do that, I first have to find out how to filter by menu_order. Anyone that knows how to do that?