WordPress Plugin – My Page Order Archived

This page is an archive for the older versions of My Page Order. All new comments should be made here.

Gives you manual control over the order of your WordPress pages by letting you easily set an explicit order. Works with subpages too. Now with built-in Widget support.

If you’d like to say thank you or make a donation please visit my Gifts and Donations page.

Download My Page Order:

Updates:

  • Update 3/30/2008: For WP 2.5, I’ve moved all future downloads to the WordPress Plugin directory. This page will stay up as a testament to this plugin’s popularity over the past 2 years.
  • Update 9/30/2007: Checked compatibility with WP 2.3.
  • Update 6/30/2007: The release you’ve all been waiting for!!! Built in widget support, hacking the widgets.php file is a thing of the past.
  • Update 5/17/2007: Javascript include bug fix, won’t mess up the editor now, redownload if you had the previous 2.1.3 version. 2.2 update coming soon but current version should still be compatible. Things are good with 2.2.
  • Update 5/10/2007: Big update! I rewrote the interface and replaced the unfriendly up and down arrows with spiffy new drag and drop ordering. Check it out, definitely worth the upgrade, I’ve only tested on 2.1.3 but it should work on any 2.1.x install.
  • Update 1/22/2007: Updated to WP 2.1.
  • Update 1/14/2007: Checked compatibility with WP 2.0.6, no changes needed.
  • Update 9/8/2006: Checked compatibility with WP 2.0.4, removed annoying javascript popup warning when arrows were clicked without anything selected, pages with no subpages will no longer show up in the dropdown, change to prevent submission if nothing selected in dropdown.

This is my third WordPress Plugin and I’m continuing with the idea of being able to control the order of how things are displayed. Categories and Links have various means of being ordered, there’s just no way to manually set an order.

Pages on the other hand have a means of specifying an order which was introduced in WP 2.0. The Page Order tab was added on the Write Page screen. The way this ordering is implemented though makes it completely useless. The order doesn’t automatically increment when you start a new page and it is a major pain to insert a page where you want it. Got a new page you want to insert at the top of 25 other pages? Have fun incrementing the order on 25 pages (unless it accepts a negative number which is just another bad idea).

This plugin gives you a simple interface that allows you to arrange the order of your static pages. It uses and sets the same field in the database as WP does so if you have set an order before it will be preserved.

Installation instructions:

  1. Move mypageorder.php to /wp-content/plugins/
  2. Activate the My Page Order plugin on the Plugins menu
  3. Go to the “My Page Order” tab under Manage and specify your desired order for pages
  4. If you are using widgets then just make sure the “Page” widget is set to order by “Page order”. That’s it.
  5. If you aren’t using widgets, modify your sidebar template to use correct sort parameter, “sort_column=menu_order”:
    wp_list_pages(‘sort_column=menu_order&title_li=<h2>Pages</h2>’);

Sort attribute

In your templates (accessible through the theme editor or downloading the file off the server) there might be several places your list of pages gets outputed. To use your sort order each instance must have the sort column argument set like the following:

wp_list_pages(‘sort_column=menu_order’);

That’s it. Out of the box everything is there to make the manual ordering happen, it just needs a better interface to make it less time consuming for the WP user to manage and my plugin is really just a stopgap measure until something better gets built into the WP release.

If you have any problems let me know, I am more than happy to help resolve any issues you may have. I’ll respond to your comment through email so be sure to put a valid email in. Even if you don’t have problems leave a comment or throw a couple bucks to buy some beer.

398 Replies to “WordPress Plugin – My Page Order Archived”

  1. Pingback: Créditos
  2. Hi, can this plugin also be used to place pages in suborders or will it only order pages in a given level?

    Now I still need to go to WP edit to create sublevels.

    Ronan

  3. How to open the plugin after activating i am from where ???

    Go to the “My Page Order” tab under Manage and specify your desired order for pages

    Where is Manage in Dashboard ????

  4. I really really have been looking for a plugin like this. My subpages weren’t in alphabetical order and I am a beginner in code – thanks for this!

  5. I modified your for() loop so that the for loop starts off at -99 instead of 0. This means that new pages with a default of 0 for their menu_order show up at the bottom of the list instead of the top. Kind of nice. Maybe you could add an option to the page which allows users to pick the first value in the for loop. Thanks for a nice plugin. -Will

  6. My main-nav.php template is the only place where I found reference to pages.
    But I cannot find the sort parameter you are talking about – can you please take a look at this code and let me know if there is something else I should modify? I commented out the first part as that was causing me to have 2 HOME’s listed in the top nav. thanks!


    <!–COMMENTED THIS OUT TO REMOVE THE EXTRA HOME IN THE TOP NAV<li>
    <a href="” title=””>–>
    get_results(“SELECT post_name, post_title, ID FROM $wpdb->posts WHERE post_type=’page'”);
    $getTitle=trim(wp_title(‘ ‘, false));
    $check=0;
    foreach($pages as $page){ ?>
    post_title);
    if($getTitle==$getPageTitle)
    {$check=1;}
    else
    {$check=0;}
    ?>

    <a href=”ID); ?>”>post_title; ?>
    <span class="mpost_title; ?>”>

  7. Hello,

    I got your plugin to download and install just fine.

    There are some pages I wish to exclude but for the life of me I can’t figure out where to find the Page ID to type into the exclude box.

    My permalinks are custom so I cannot use that method. Is the Page ID shown on the page somewhere?

    Thank you

    John Mann

  8. I love you people that put this code u gotta chnage this and that…not once did one person say were this code you need to chnage is NOT ONCE in one of these comments…THIS PLUGIN DOES NOT WORK FOR ME

Comments are closed.