How to add order column to Wordpress Word pages?

I spent most of the day on this but couldn't find a solution. Could you please tell me how to add order column on (admin) page in WordPress?

+3


source to share


3 answers


I think you need to add a column to your page list page
The following code will add a column to your page list,

add_filter('manage_pages_columns', 'my_columns');

function my_columns($columns) {
    $columns['order'] = 'Order';
    return $columns;
}

add_action('manage_pages_custom_column',  'my_show_columns');

function my_show_columns($name) {
    global $post;

    switch ($name) {
        case 'order':
            $views = $post->menu_order;
            echo $views;
            break;
    }
}

      



enter image description here

+6


source


@chhorn Soro you need to go through this nice answer https://wordpress.stackexchange.com/questions/43970/adding-menu-order-column-to-custom-post-type-admin-screen .



this will help you display / add a new field to the list

0


source


This free plugin gives you the ability to add an order column to all overview pages along with many other interesting columns.

https://wordpress.org/plugins/codepress-admin-columns/

0


source







All Articles