WordPress.org

Support

Support » How-To and Troubleshooting » WP 3.2, wp_list_bookmarks, orderby=id: not working

WP 3.2, wp_list_bookmarks, orderby=id: not working

  • Hi,

    I recently updated to WordPress 3.2. When I did, my list of bookmarks stopped working correctly. They always displayed ordered by id, as I had specified in my PHP code, but now they display by name.

    Here’s my code:

    <?php wp_list_bookmarks('orderby=id&order=DESC&category=373&categorize=0&title_li=0&limit=10&after=<div id="whitenoise-linkdivider"></div><li>&show_description=1'); ?>

    Any idea what’s going on?

    I have set orderby to rand. It works, and is an acceptable short-term substitute.

    Thanks for your time!

Viewing 15 replies - 1 through 15 (of 20 total)
  • Moderator t-p

    @t-p

    I am having the exact same problem with my blog. Tried disabling all the plugins, and it didn’t do anything. Seems like it might be a bug with the latest version of WP…

    This seems to be a bug with the latest version of WP. I am having the same issue across multiple WP sites.

    I haven’t come up with a workaround yet.

    esmi

    @esmi

    Forum Moderator

    Can you confirm this using Twenty Eleven and no active plugins?

    Yes. I have installed Twenty Eleven and disabled all plugins and still have this issue. It seems that the “orderby => ‘id'” class is no longer recognized.

    I am having the same problem.

    I installed a fresh copy of wordpress 3.2.1 and put in a very stripped down theme and tested the orderby=id and it worked fine.

    On my production site, I disabled all plugins with out getting any result. Then I did a manual install of wordpress and no result there either.

    My conclusion is that there must be something about my theme that is messing it up, but I can’t imagine what. This is a very simple call to the database.

    If anyone finds a solution, please let me know.

    esmi

    @esmi

    Forum Moderator

    It seems to be working for me. If your links are in a number of different categories, have you checked out the category_orderby and category_order attributes. They will be altering the order of the final list of links.
    http://codex.wordpress.org/Function_Reference/wp_list_bookmarks

    I’ve used both category_orderby and category_order with no change.

    Every other type of orderby is working except the id.

    Thanks esmi, however, I am only using one category and have it listed in the parameters. This is the code I am using:

    <?php wp_list_bookmarks('title_li=&categorize=0&category=2&before=<p>&after=</p>&show_images=0&show_description=1&orderby=id&order=ASC&link_after=<br />'); ?>

    It’s encouraging, in a way, to see that others are having this problem. I don’t feel so crazy.

    Just to update, I haven’t been able to fix this problem since I first posted. Then again, I haven’t done a clean install yet.

    change this:
    orderby=id

    to this:
    orderby=link_id

    That should solve your problems. Sadly it doesn’t solve mine; I had been ordering by ‘notes’ but that functionality seems to have disappeared. Here is a quick test I did on the supposed orderby values. Y=works

    Y ‘id’ (use ‘link_id’ with WP 3.2 and later)
    Y ‘url’
    Y ‘name’ – Default
    N ‘target’
    N ‘description’
    ? ‘owner’ – User who added bookmark through bookmarks Manager.
    M ‘rating’ [sort of, all links need to be rated, or the rated links go to end of an id-sorted list
    ? ‘updated’ Note: the link_updated field does not track local modifications. It tracks when whatever the link points to is updated via remote requests to pingomatic.
    N ‘rel’ – bookmark relationship (XFN).
    N ‘notes’
    N ‘rss’
    Y ‘length’ – The length of the bookmark name, shortest to longest.
    Y ‘rand’ – Display bookmarks in random order.

    This worked! Thank you SO much raskull!

    Worked for me too! Where the heck was this documented?

    I had been using ‘notes’ to order the links by entering 01, 02, … 10 in the Notes text boxes — worked just fine. In fact I actually numbered them 05, 10, 15, 20, etc to allow for infill without renumbering. Now that that functionality is gone, I guess I will have to order by ‘id’ and remake the links in the order I want them. There has to be a better, plugin-less way!

    Hey Raskull, thank you very much! orderby=link_id worked for me. I really appreciate it!

Viewing 15 replies - 1 through 15 (of 20 total)
  • The topic ‘WP 3.2, wp_list_bookmarks, orderby=id: not working’ is closed to new replies.
Skip to toolbar