WordPress – Order posts by custom order

To custom order WordPress posts or custom posts type add following code to your functions.php file in your theme folder:

add_action( 'admin_init', 'posts_order_wpse_91866' );

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

WordPress query to get posts ordered by menu order

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

Super Rishi - Just Another Programming Geek

Comments are closed