How to use “menu_order” field for posts?

Apparently it’s as easy as:

add_action( 'admin_init', 'posts_order_wpse_91866' );

function posts_order_wpse_91866() 
{
    add_post_type_support( 'post', 'page-attributes' );
}

And then doing the query:

$order_posts = new WP_Query(array(
    'post_type' => 'post', 
    'post_status' => 'publish', 
    'orderby' => 'menu_order', 
    'order' => 'ASC', 
) );

Leave a Comment