I got an e-mail today from someone who found my My Link Order plugin but wanted to order his pages instead. At first I wasn’t completely sure if you could but a quick look at the core files, database, and WP site answered that question.
Yes, you can set the order in which pages show up in your sidebar, but it is a little clunky. When you edit a page, there is an option to set the “Page Order” to a certain number (in WP 2.0 this is one the collapsable boxes). Now follow these steps:
- Set the Page Order on each page in your desired order.
- Check if that changes the order, if not you will need to make a change to your template to tell it to sort on that order instead of by name.
- Go to Presentation->Theme Editor and select the Sidebar page (I’m assuming this is where your list of pages is being displayed). Find the line that is using a function named wp_list_pages, the whole line should look something like this:<?php wp_list_pages(‘title_li=<h2>Pages</h2>’ ); ?>
A parameter to tell it to sort by your order needs to be added:
<?php wp_list_pages(‘title_li=<h2>Pages</h2>&sort_column=menu_order’ ); ?>
With that added your pages should now be sorted. I might create a plugin similar to My Link Order to handle the setting of orders because the current way is annoying and very very very user-unfriendly.