Give help. Get help.

  • # November 14, 2017 at 1:39 pm

    Hi Recently I am trying to developing a WordPress Theme and want to display menu order with sort. I added the column using below code but not sorting

    add_filter('manage_posts_columns', 'posts_columns_order', 5);
    add_action('manage_posts_custom_column', 'posts_custom_columns_order', 5, 2);
    function posts_columns_order($defaults){
        $defaults['menu_order'] = __('Order');
        return $defaults;
    function posts_custom_columns_order($column_name, $id){
            global $post;
            if($column_name === 'menu_order'){
          $order = $post->menu_order;
          echo $order;
Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.