WordPress.org

Ready to get started?Download WordPress

Forums

Sorting links by date (11 posts)

  1. Rockforum
    Member
    Posted 4 years ago #

    Hi all!

    Im setting up a new site and I want a widget in my sidebar for "Latest news"-links. This is links to external news-sites. I want the latest published link to be on top and thereafter, but I havent found any plugin or "hack" to do the job. Is there anybody who know how to do this?

  2. esmi
    Forum Moderator
    Posted 4 years ago #

    Use Link Categories to organise your links to external sites then use the dropdown in the native Links widget to limit the link display to your chosen link category.

  3. Rockforum
    Member
    Posted 4 years ago #

    Thanks, but does it sort the links by date?

  4. Rockforum
    Member
    Posted 4 years ago #

    Please somebody!? Im lost!

  5. MichaelH
    Member
    Posted 4 years ago #

  6. Rockforum
    Member
    Posted 4 years ago #

    Thanks! But theres no 'date'-option in 'orderby'?

  7. MichaelH
    Member
    Posted 4 years ago #

    From http://codex.wordpress.org/Template_Tags/wp_list_bookmarks

    orderby
    (string) Value to sort bookmarks on. This can be a COMMA separated list of values. Defaults to 'name' unless you pass the value of '' (empty), in which case it sets to 'id'. Valid options:

    * 'id'
    * 'url'
    * 'name' - Default
    * 'target'
    * 'description'
    * 'owner' - User who added bookmark through bookmarks Manager.
    * 'rating'
    * 'updated'
    * 'rel' - bookmark relationship (XFN).
    * 'notes'
    * 'rss'
    * 'length' - The length of the bookmark name, shortest to longest.
    * 'rand' - Display bookmarks in random order.

    If you are using Widgets, then you may need a PHP Code Widget and craft your own code into that widget.

  8. Rockforum
    Member
    Posted 4 years ago #

    I might be blind, but I didnt find it earlier, and I cant see it now...orderby what?

  9. MichaelH
    Member
    Posted 4 years ago #

    Probably want to use id and order=DESC.

  10. greenpeas
    Member
    Posted 4 years ago #

    Is there an option for using post date in orderby?

  11. christine baker
    Member
    Posted 4 years ago #

    Been struggling with that too. The IDs are created in the order posted and that works good for me.

Topic Closed

This topic has been closed to new replies.

About this Topic