Monday, November 13, 2006

Listing Page Management by menu order (Wordpress)

What does it do?

Changing the ID column into Page Order (menu_order) column in Page Management. Note: this is not a wordpress plugin although there are plans to make it so.

Why is this made?

The Wordpress Page Management list each page along with its ID, Title, Owner, Updated details and editing buttons. However more often that not I find there's a need to see the Page Order when sorting pages out and I feel that instead of listing the Page ID, the Page Order will be more useful.

How to change it?

There are three parts to change in two different pages:

  1. wp-admin/edit-pages.php

    Find this on line 34:
    <th scope="col"><?php _e('ID') ?></th>
    Replace with this:
    <th scope="col"><!-- 061114 Seige --><?php _e('Order') ?></th>

    Find this on line 47:
    <th scope="col"><?php echo $post->ID; ?></th>
    Replace with this:
    <th scope="col"><!-- 061114 Seige --><?php echo $post->menu_order; ?></th>
  2. wp-admin/admin-functions.php

    Find this on line 638:
    <th scope="col"><?php echo $post->ID; ></th>
    Replace with this:
    <th scope="col"><!-- 061114 Seige --><?php
    if ($post->post_status == 'static') {
    echo $post->menu_order;
    } else {
    echo $post->ID;
    }
    ?><!-- 061114 Seige --></th>

And now you can easily make changes to page order whenever you want to add new pages.

2 comments:

Pastor Yamil Luciano said...

Testing

Seige said...

And so, how did it work?