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. I was just sifting through the Codex to figure out how to code this functionality. Came across your plugin and got the results I was looking for in much less time.

    Thank you so much!!

  2. Hmm. It worked… sort of. It reordered the pages in the sidebar brilliantly but those are commented out on my blog because I’m using the page tabs for navigation and your wonderful widget doesn’t reorder those. They remain annoyingly in alpha order. Fabulous work for what it does though.

  3. OK, I have only one issue now.
    I got it set up – It works. I love it…

    But I installed a Javascript file in js folder for a video plugin and then all of a sudden, it’s back to alphabetical.

    Any ideas on why? Anyone?

    Thanks in advance!

  4. I tried to use your plugin in WP 2.1.3, but I do not see how to save the page order. I can move them around, but they do not get saved.

    Matthias

  5. To get the page order tool working, just use this script in place of the current one (mine is in the header) and it looks at the page order in your admin tool. WordPress should have activated this by default:

  6. Thanks for the suggestion jenz, I will definetely put it in the next version. Drafts don’t show up on the front end so it makes absolutely no sense to show and order them on my plugin page! Duh.

    Also the next versions of my plugins should be pretty nifty, I’m going to implement some drag and drop ordering to make things a little easier, just need to get the interface designed correctly to handle large numbers of links/pages/categories.

  7. Does this give the ability to reorder posts as well? And If not, does anyone know of a plugin that does?

  8. Hello,

    I just wanted to drop a not, this plug in works super great. I love it. But, I find myself de-activating it when is not in use because makes my wordpress install run super slow. Sorry for using the word super so much. Anyway, thanks man! great job.

  9. I still can’t get this to work for me.. I’ve replace my “wp_list_pages(‘title_li=’ . __(‘Pages’) . ” );”

    with

    “wp_list_pages(’sort_column=menu_order’);”

    and for some reason my sidebar just shows up blank when I do that. Any suggestions?

  10. @Marc:
    Hey, I’m not much of a PHP guy myself, but I know enough to hack stuff up. I had the same problem as you did, getting a blank page with the above used code. (I’m also not using Widgets.) Try this:


    ' . __('Pages') . '' ); ?>

    That might work or might not depending on the theme you’re using.

  11. @Marc:

    Whoops… this instead. (Replace the quotes with carrots)

    “?php wp_list_pages(‘sort_column=menu_order&title_li=’ . __(‘Pages’) . ” ); ?”

  12. Well, i put in:

    “?php wp_list_pages(‘sort_column=menu_order&title_li=’ . __(‘The Word’) . ” ); ?”

    and it worked!

  13. Thanks so much for this. You made have made something which should be simple simple again.

  14. Another question guys.. on my site under the “Social Photos” and under Edinburgh I have multiple pages listed.. for some reason theres a gap between some of them. Anyone know why? Here’s my page:

    http://anempireoffilth.com/thepalehorse/

    Thanks!

    P.s. (thanks again for the help wes, i’d have contacted you, but you left no address!)

  15. And I know it’s off topic.. but anyone know how to get a footer to actually show up as a footer? Ha.. Mine just shows up on the right hand side.

  16. I hope I didn’t miss the answer to this, but I have it installed and it seems to be working fine…but…

    It puts Page (bad formatting too) at the top of the pages items and I want to remove it, but I can’t find how to do that.

    I put:
    wp_list_pages(‘sort_column=menu_order’ );
    in the Side Bar file. I have no widgets running.

    I’m really under the gun trying to fix all of this. Any help would be great!

    Dave

  17. Great job!!! Very nice. I too wanted to get rid of the “pages’ title as I have my page links across the top of the page as I am using the Andreas04 theme. So I edited the header.php and replaced the code noted above with:

    wp_list_pages(‘sort_column=menu_order&title_li=’ );

    I’ve removed the lessthan?php at the beginning and the ?greaterthan at the end for the line for posting purposes.

  18. In WP 2.2.1, what worked for me, in wp-includes/widgets.php:

    wp_list_pages( ‘title_li=&echo=0&sort_column=’ . $sortby . $exclude );

    change to:

    wp_list_pages( ‘title_li=&echo=0&sort_column=menu_order’ );

  19. Hei!

    I think i found a bug: I use the RoleManger and i has a wp-prosjekt without posts, just pages. If it is disable to write posts (use rolle-manager), i cannot us mypageorder. Can you fix it?

    Thanks for your great work!
    Markus

  20. This is just great — wish it was included in the basic WP installation! (The page order issue is clumsy and confusing in WP, and support — as always — is cryptic at best).

    This is just a great plugin and works wonderfully. Thank you!

  21. Uh-oh — even though I installed the latest version (2.2), the My Page Order plugin seems to disable the visual editor in WP.

    I’m using Firefox, the latest version with updates. Any idea how to fix this?

    Right now the workaround is for me to enable the MyPageOrder plugin to reorder the pages and then disable it again.

    Thanks!

  22. Is the 2.2 supposed to provide a MyPageOrder widget? There is no coding in the 2.2 release for widgets.

    Mike

  23. You can use the built in “Pages” widget and set it to sort by “Page Order”. The My Page Order plugin doesn’t really add new ordering methods like my other 2 plugins, it just gives you an interface to batch order the “Page Order” that is on the individual page edit screen.

  24. This sounds what I have been after as I hate having to manually edit the .php files for the menu.

    Cannot understand why this has not been made before..

  25. Great plugin and a ‘must have’ for any WordPress CMS site. I have been looking for this functionality for awhile. Look for a donation coming your way.

    Cheers,
    Brandon

  26. Absolutely great, i have just one request: my site has lots of pages, all with lots of subpages, so is there any chance the plugin could display the name of the current parent page when i’m ordering sub-pages, so i don’t forget where i am?

    (if the edit/view/delete buttons could also be incorporated, this plugin would for me easily replace the inbuilt ‘manage pages’ screen!)

  27. Excellent pluggin – thanks a bunch. I was trying manually to edit the pages without success. Cheers

  28. Hi, I have the same problem as Tyler:
    Uh-oh — even though I installed the latest version (2.2), the My Page Order plugin seems to disable the visual editor in WP.

    I’m using Firefox, the latest version with updates. Any idea how to fix this?

    I am using firefox 2.0.0.7 and WP 2.3RC1

  29. WP2.2.3 – MyPageOrder2.2
    The installatioin seems to have worked. I am able to activate the plugin and re-order pages in “My Page Order”, however the changes do not reflect on my website. When I go back the “My Page Order” my desired order sticks.

    From the instructions… just make sure the “Page” widget is set to order by “Page order” – I don’t think I understand this. Is there another setting or bi of code somewhere I’m missing?

    Any help greatly appreciated; thanks!

  30. I should proof my writing before posting. It makes it much easier for the reader to understand; with corrections:

    WP2.2.3 – MyPageOrder2.2
    The installation seems to have worked. I am able to activate the plugin and re-order pages in “My Page Order”, however the changes do not reflect on my website. When I go back to “My Page Order” my desired order sticks.

    From the instructions… just make sure the “Page” widget is set to order by “Page order” – I don’t think I understand this. Is there another setting or bit of code somewhere I’m missing?

    Any help greatly appreciated; thanks!

  31. This plugin is a god-send. I’ve manually edited the order on other installations, but this is just so easy.

    Thank you for a great plugin!

  32. OMG I have died and gone to heaven (which many Jews don’t even believe in, but call me a believer!). I can’t tell you the HOURS I have spent trying to sort pages. I have HUNDREDS of pages to bring over from my old site. I photographed hundreds of rock shows and they MUST be in order for my fans, and people who license and buy them!!

    So I am setting things up before I begin that arduous process. Why oh why isn’t this built into WP??

    THANK YOU!!!! Why haven’t I found you earlier! I think I need to explore more plug-ins before WordPress codex leaves me exhausted and frustrated! I love WordPress, but I wish their codex would link to more solutions!!

Comments are closed.