Showing posts with label wp-admin. Show all posts
Showing posts with label wp-admin. Show all posts

Wednesday, January 03, 2007

WP List Pages - Seigey

This is a wordpress plugin, it's purpose is to create pages navigation using the wp_list_pages() function that includes dynamic menu highlighting of all parent pages. By simply adding "current_parent" into the css of all parent pages, it is hence possible to highlight the parent of the current page. While on current pages, a css tag of "current_page_item" will be added.
Click here for a simple example.

To install this plugin:

  1. Download this plugin.
  2. Upload this plugin to "wp-content/plugins" folder.
  3. Go to "Plugin Management" and activate it.

To uninstall this plugin:
  1. Go to "Plugin Management" and deactivate it.

Compatible with Wordpress 2.0 and above.

To run the plugin, insert the following code into "sidebar.php" or "header.php":
<ul>
<?php if ( function_exists(wp_list_pages_seigey) ) wp_list_pages_seigey('sort_column=menu_order' ); ?>
</ul>


Please note that all queries are the same as those in wp_list_pages(). For example: sort_column, exclude, depth, title_li,

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.