Support » Fixing WordPress » displaying ‘get_links’ in order of addition

  • Hi WP-land,

    I have a small links section at the top of my page. a sort of ‘new news links from other sites’. I’m listing it with this code:

    <?php get_links(2, '<li>', '</span></li>', '<br /><span>', true, '_updated', true, false, 3, true); ?>

    for some reason it’s not sorting by time updated _and_ it’s not showing the timestamp. Am I just missing something? Some header link I need to include?

    I’ve read and re-read . I am dense so…

    Thanks for any help,

Viewing 9 replies - 1 through 9 (of 9 total)
  • Really? No one? Do I need to give you more info or is there something funny on my face?

    The above still isn’t working but now I have another question…

    I’d like to limit it to links added today. I was trying to figure out how to do this via wpdb query but can’t get it. I’m sure it’s there. I’m still a PHP noob. Something like, get an array of links that have a date of today and make me a ul li of them, sorted in reverse. Anyone doing this?


    To just get the latest ones, couldn’t you use a reverse ID sort order?

    I thought so too oriecat but that’s part of my problem (see post 1).


    In your example, you are sorting by _updated. Have you tried sorting by _ID?

    re: ID – didn’t even occur to me that it would accomplish the same thing. Thank you oriecat!

    It’s still not showing the date added though. I dont geddit.

    I dont mean to bump this but… can some one please help me figure out how to limit the links displayed to ‘today’ only?



    I too have this problem. Like Will I want my links to sort by last updated with the link with the most recent posts at the top. I cannot get it to do it. Is this a bug or am I doing something wrong (quite possible)? My get_links code is: <?php get_links(‘-1’, ‘<li>‘, ‘</li>‘, ”, 0, ‘_updated’, 0, 0, -1, 0); ?> and I use the Blix theme as my template.


    I realise this thread is from last year, but I’m having the same problem (listing the most recently updated links first and with date). I tried wp_get_links plus parameters and get_links plus Link Manager. I also solved the problem of listing the latest links first by sorting by ID… but I don’t get a date stamp either way, neither in the link text nor in the tooltip.

    Any help would be appreciated!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘displaying ‘get_links’ in order of addition’ is closed to new replies.