WordPress Plugin – My Link Order Archived

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

Gives you manual control over the order of your WordPress link categories and links by letting you set an arbitrary order. Includes drag and drop ordering and a replacement Widget.

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

Download My Link Order:

Updates:

  • Update 3/19/2008: With 2.5 coming up, 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 2/09/2008: Works with 2.3.3, just copy taxonomy.php again.
  • Update 9/30/2007: Updated to WP 2.3. The category table got nuked this release so you’ll need to go back and order your categories again (link order is preserved).
  • 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. I’m also dropping support for WP1.5, if you really really need it just ask, but seriously if you are on 1.5 it is about time to upgrade.
  • 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: Published WP 2.1 version of plugin. Eliminates need to modify core files but uses new WP template function. Also eliminated up/down arrow images, now uses plain buttons to avoid problems with image paths. See updated instructions above.
  • Released January 2006 for WP 1.5 and soon after 2.0, many updates followed 2.3, 2.2, and 2.

Installation Instructions

  1. Unzip packed files
  2. Move mylinkorder.php to /wp-content/plugins/
  3. 2.3 only: move taxonomy.php to /wp-includes/
  4. Activate the “My Link Order” plugin on the Plugins menu
  5. Go to the “My Link Order” tab under Blogroll and specify your desired order for both link categories and links in each category.
  6. WIDGETS: Just drop the “My Link Order” widget that gets installed with the plugin and that’s it!
  7. Modify sidebar template to use correct function (additional parameters seperated by ampersands):
    wp_list_bookmarks(‘orderby=order&category_orderby=order’);

If you have a problem with it not ordering, make sure you have a plain “&” and not “& amp;” between the parameters which could happen if you copy straight out of the browser. Also make sure quotes are plain straight ones, some people have had problems when copying and pasting code out of the browser and PHP chokes on the bad quote character.

Thanks for checking out my first WordPress plugin, My Link Order. I wrote this because WordPress is sorely missing the ability to manually set the order link categories and links themselves will appear in. WordPress provides seven options for ordering just links (ordering categories is mysteriously absent) and they all seem to tip toe around the idea of actually letting the user explicitly set the order they want. 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.

502 Replies to “WordPress Plugin – My Link Order Archived”

  1. Can you tell me if your plugin will allow me to control the order of link output in my theme editor sidebar section? Currently I have over thirty template files on my customised theme, and they don’t render in alphabetical order in the theme editor page, which is a nightmare when you’re trying to locate a particular file.

    I had asked the WordPress forum about this, but I did not get a reply.

  2. My plugin will let you order your link categories and links manually (instead of the various methods like by id, by name, etc built into WordPress), giving you more control over the order they appear on your front page.

    You are looking for something a little different it seems (just sorting the files by name on the theme editor page), but it is definetly possible to do. I’ll look at the source code and see what it will take to do. Which version of WordPress are you using?

  3. Yeah, my links are in the sidebar too…what can we do about that? I’m not afraid to manually edit the code, but I don’t know what to edit! Great idea though, man, I’ve been looking for something like this for a long time…as important as page real estate is these days….

  4. I am having a problem when clicking on the “My Link Order” tab:

    WordPress database error: [Table ‘thetais_wordpress.wp_linkcategories’ doesn’t exist]
    ALTER TABLE `wp_linkcategories` ADD `my_cat_order` INT( 4 ) NOT NULL DEFAULT ‘0’

    WordPress database error: [Table ‘thetais_wordpress.wp_links’ doesn’t exist]
    ALTER TABLE `wp_links` ADD `my_link_order` INT( 4 ) NOT NULL DEFAULT ‘0’

    WordPress database error: [Unknown column ‘my_cat_order’ in ‘order clause’]
    SELECT * FROM ibc_linkcategories ORDER BY my_cat_order ASC

    Any ideas?
    Thanks for your time.

  5. This plugin should have been implemented by WP by default, but luckily you can help us poor users.

    I have encountered an error though, when displaying the sidebar::

    WordPress database error: [Unknown column ‘my_link_order’ in ‘order clause’]
    SELECT link_url, link_name, link_image, link_target, link_description, link_rating, link_rel , CHAR_LENGTH(link_name) AS length , IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated FROM ibc_links WHERE link_visible = ‘Y’ AND link_category = 6 ORDER BY my_link_order ASC

    Hope you can help me.

  6. Don’t know what the problem is, everything went well with the installation, but the categories don’t update (reorder). Tried deleting cache, etc to see if it was my computer, but no go. Any ideas?

  7. I have had the same problem as Joan – everything installed lovely, but after setting the links in the order I wanted them, the links in the sidebar didn’t change their order.

  8. Hi – it seemed to set up ok for 2.0.1, but I think I may have gotten the wrong impression of what it does. It reorders “link categories”? This is different from the section called “Categories” right? I want to reorder my different categories and can’t seem to figure out how – under “link categories” all I have is “blogroll”
    Frustrating.

  9. HI. The plugin is great, it does exactly what is expected. Thanks!

    I did have to remove some code from your verison of links.php though as the line near 552 was inserting my link categories in a with a cat-ID and i twas messing up my layout. I simply removed the additinonal and now it works great.

    Thank you.

  10. “Don’t know what the problem is, everything went well with the installation, but the categories don’t update (reorder). Tried deleting cache, etc to see if it was my computer, but no go. Any ideas?”

    “I have had the same problem as Joan – everything installed lovely, but after setting the links in the order I wanted them, the links in the sidebar didn’t change their order.”

    I have the same problem as the two users quoted above. Followed all the instructions, well at least the ones I understood.

    “Set Category Sort Order dropdown to “Manual” on categories you wish have links manually ordered”

    In 2.0.1, there is no “Manual” in the “Sort Order” drop down box.

    Thanks for any help.

  11. Here’s what my links section looks like…

    get_results(“SELECT cat_id, cat_name FROM $wpdb->linkcategories”);
    foreach ($link_cats as $link_cat) {
    ?>
    cat_id; ?>”> cat_name; ?>
    cat_id); ?>

    Which part do I replace with get_links_list()? I tried replacing wp_get_links() with get_links_list(). While that worked with the order, it also lists all the categories and links in each category. That is, say I have two categories. On called “Blogroll” and one called “Random”. Blogroll has three links, “Blogroll Link 1”, “Blogroll Link 2”, and “Blogroll Link 3”. Random has three links as well, “Random Link 1”, “Random Link 2”, and “Random Link 3”.

    So the way the blog would look with my changes is…

    Links:
    Blogroll
    Blogroll
    Blogroll Link 1
    Blogroll Link 2
    Blogroll Link 3

    Random
    Random Link 1
    Random Link 2
    Random Link 3

    Random
    Blogroll
    Blogroll Link 1
    Blogroll Link 2
    Blogroll Link 3

    Random
    Random Link 1
    Random Link 2
    Random Link 3

    So what am I doing wrong?

    Thanks.

  12. This looks like a great plugin and I’d really like to install it. I am just worriied about the need to alter core files. What happens when it comes time to upgrade WP? Will I need to remember that I altered those files?

    I’m a wordpress newbie so sorry if the answer to this is obvious. Thanks!

  13. Jesse,

    You’ll want to replace that entire block in your template with the single line, get_links_list(); That will loop through the categories for you in the order you have specified. There are a number of functions that ouput the links, but as far as I can tell this is the only one that makes sense to use in the context of my plugin.

    Andrew

  14. Rena,

    When it comes time to upgrade, the core files I alter in my plugin will be overwritten which essentially disables the plugin. Whenever there is a WP upgrade I will publish a new version of my plugin and you’ll need to install it again. The files I alter don’t seem to have changed much, if any, in the past three releases, but I have not taken the time to do compares and see if they are indeed different. I’ll probably do it the next time to avoid duplicating my work if I have to. Also, if you uninstall or upgrade the plugin, your orders will be saved so you don’t have to redo them.

    So the answer to your question is, you don’t need to remember which files you altered, just that you have to re-install my plugin when you update WP.

  15. One more question. As I stated in a previous comment, the instructions state that you have to a category’s “Sort Order” to “manual” in order to get the links in that category to sort the way you’d like using this plugin. However, I don’t see a “manual” option in the “Sort Order” drop down. All I see are “Name”, “ID”, “URL”, “Rating”, “Updated”, “Random”, and “Name Length”.

  16. Double check you copied over link-categories.php to the wp-admin folder. The only reason the option wouldn’t be showing up is if that file wasn’t updated.

  17. New version to match 2.0.2 is up, no changes were needed so just changed the file name to avoid any confusion.

    If you have any problems with the upgrade to 2.0.2 check the permissions on the mylinkorder plugin directory. Mine got reset when I copied the new WP files over and lost its read permission. Everything worked, but the up and down images used for ordering were gone. A chmod 755 fixed that right up.

  18. I just wanted to post a pointer to folks who had what seemed to be a clean install, but are finding no results of success on their links pages.

    In my case, it turned out that my FTP program hadn’t actually overwritten the two core WP files, even though it acted as though it had. I deleted the two files from the server entirely, uploaded the plugin’s version of those two, and all was well.

    Sweet plugin, BTW! Thanks.

    It would be great if you could hook up with the WP developers and find a way to stop involving the core WP files. Can they not add hooks that would let you plug in entirely? This is a long-overdue functionality…I would think they’d be into helping you integrate it more smoothly. Then you wouldn’t have to keep issuing new versions every time they do. (And we all wouldn’t have to re-install each time.)

    Either way…great plugin.

  19. Wish I could get this right but for some reason, despite repeated deleting and re-adding of the link-catagories.php file, I cannot get manual to show up in the drop down. Checked the permissions on the plugin folder, everything. *taps head against screen* lol

  20. Got it! In the instructions, I was confused because I was trying to find the Manual in the landing page for Links. When I went to Edit the catagory, the Manual selection was in there and upon setting it, everything was fine.

    Thanks for this great improvement!

  21. Are you going to (or is there a plug-in that allows this already) make a plug-in that gives this same type of control over the order of the pages section of WP?

  22. I’ve had that request before and have just been really busy for the past month or so. I’ve got spring break coming up and I’ll do it then, so check back in 2 weeks.

  23. Great – Thank You!

    Quick question though….

    The plug-in works great for the categories that I create but seems to ignore the cat’s that WP automatically generates (IE Links, Categories and Archives sections).

    Did I do somehting wrong in the installation or does the current plug-in ignore those? They don’t show up in the list to be moved around.

  24. Nope, you didn’t do anything wrong. Under the hood, WP displays each of those things separately so you have to think of each of them as their own contained block. It would be possible to get them to work with my plugin, but not without further modification to the core files, database, and templates.

    I am working on bringing up these issues with the WP developers because something needs to be done from the top, not by individual users.

  25. Hey, great job on the plugin, but i have a problem. I just updated my wordpress files to the newest version, and i keep getting this SQL error, when i sort the categories by “manual”

    WordPress database error: [Unknown column ‘link_manual’ in ‘order clause’]
    SELECT link_url, link_name, link_image, link_target, link_description, link_rating, link_rel , IF (DATE_ADD(link_updated, INTERVAL 120 MINUTE) >= NOW(), 1,0) as recently_updated , UNIX_TIMESTAMP(link_updated) AS link_updated_f FROM wp_links WHERE link_visible = ‘Y’ AND link_category = 1 ORDER BY link_manual ASC

    Why would this start happening only after the update? Any suggestions?

  26. What a let down! I thought it would help me reorganise my WP Categories! :(

    Ah well, good on you for catering to user needs anyway. I’m sure I’ll end up using this plugin at some point. :)

  27. Hi it doesn’t seem to work with mine. I see it but I can reorder links even though it appears as though I should be able to.
    What do I have to do to my theme to fix that.

  28. Just writing to say thanks. Worked like a charm and I am a virtual idiot when it comes to rummaging around under the hood of WP. Agree with earlier commenters on the virtue of being able to reassign the seemingly unalterable “pages”; “archives”; “categories”; “meta” categories, but will happily leave that for another day.

  29. Would it be possible to edit the installation instructions (for us idiots, it just took me FOREVER to figure it out and only then by reading all the comments) to mention that you will have to edit EACH CATEGORY’s settings in the Links menu to manual? For those of us just starting to use WP (particularly when we’ve moved from other less spiffy blogware) it can be a bit confusing.

    Hell, I’d rewrite your instructions for you if you wanted.

  30. Ang,

    Thanks for your feedback on the instructions. I will get that added in there and try to make it a little clearer overall. I enjoy getting feedback from those who use my plugin, I just wish more people would comment (49 comments with almost 2000 downloads) about their experience.

  31. You know what would be brilliant? Telling people to not use your code if they have any themes istalled other than the classic or the default.

    You know what would be almost brilliant? Telling people how to fix their worpress install AFTER your code has rendered it usuless.

    You know what is completely stupid? NOT doing one oif the above.

    Thanks for your crappy instructions – ridiculous amount of grief this has caused me.

  32. RoQ,

    My plugin uses the standard built in WP functions to display the links. I can’t be responsible for any theme that deviates from this and uses its own. If you bothered to take a look at the code I had to work with, it was very inflexible and it doesn’t get much better than this.

    I would say 80% of people that bothered to give me feedback had absolutely no problem with their installation. Others who presented their problems to me had complete support and every person you see in the comments that had a problem was contacted by me personally and had their problem resolved through e-mail. I will be happy to post all of those e-mail threads or forward them to you if you want to take back you statement that I don’t help people with their installs.

    So instead of doing something reasonable like presenting your problem and asking for help you took the easy, childish way out.

    I’m coming up on 2000 downloads of my plugin and the number of problems people have reported is actually very small. I’m sorry things didn’t work out and good luck finding another way to manually order your links.

  33. Roq: You know what would be stuipd? Using free code, breaking your (customized) wordpress blog and then complaining to the author for not warning that you’d break your blog!

Comments are closed.