I Changed the Menu Order, But the Page Order Didn’t Change on Front Page

By default, posts and pages are sorted after the date. If you want sort pages by “order” field, which is visible on edit page, you have to set orderby parameter: add_action(‘pre_get_posts’, ‘change_order’); function change_order($query) { if ( is_front_page() || is_home() ) { $query->set( ‘orderby’, ‘menu_order’ ); $query->set( ‘order’, ‘ASC’ ); } return $query; } Put … Read more

Why isn’t my multiple orderby working?

This should help: You can use multiple fields in orderby argument. Codex shows you how to do it (and you do it correctly): $query = new WP_Query( array( ‘post_type’ => ‘page’, ‘orderby’ => ‘menu_order date’, ‘order’ => ‘ASC’ ) ); And it should solve your problem. (It should, but if you want to sort DESC … Read more