• Hi all,
    I have inserted the following into my WP 1.5 template:
    Recommended Links
    <?php get_links_list('name'); ?>

    It works fine except that the sort order appears to be ‘random’ each time the page is refreshed. It’s not my template since even the default theme (with no mods) exhibits the same behavior. Since I’m specifying that the order should be by ‘name’ why am I getting this ‘random’ listing.

    Thanks much — dennis

Viewing 5 replies - 1 through 5 (of 5 total)
  • I just tried out get_links_list(‘name’) and had the same experience as you.

    The long version…

    get_links(-1, '<li>', '</li>', '<br />', FALSE, 'name', TRUE,TRUE, -1, TRUE);

    … seems to work acceptably.

    That function and its arguments are detailed here: codex: get_links().

    Thread Starter dpbeatley

    (@dpbeatley)

    Thanks for the tip – will try that version. Hopefully the WP team fixes this, or at least explains the behaviour.

    dpbeatley: Just to confuse the issue, I can’t seem to duplicate this problem. For me, get_links_list('name'); outputs links alphabetically, first by link category, then by link. There’s no apparent randomness.

    I had the same problem.

    I found that under the admin panel, the links sort order for the default cateogry was set to random by default. Check it out and see if that helps.

    i have a question about get_links_list() tag:

    in the admin area – if you specify the amount of links to display in the category then this is fine for the sidebar, but is there a way to overwrite this for the links page? i.e. would it be possible to only display 5 links in category x in the sidebar, but when viewing the links page display all the links for category x?

    have a look at https://mewebdev.net/journal/ to get an idea of what i’m talking about…

    thnx in adv.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘get_links_list sort problem’ is closed to new replies.