Forums

Sorting links by date (10 posts)

  1. Rockforum
    Member
    Posted 1 month 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
    Member
    Posted 1 month 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 1 month ago #

    Thanks, but does it sort the links by date?

  4. Rockforum
    Member
    Posted 3 weeks ago #

    Please somebody!? Im lost!

  5. MichaelH
    moderator
    Posted 3 weeks ago #

  6. Rockforum
    Member
    Posted 3 weeks ago #

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

  7. MichaelH
    moderator
    Posted 3 weeks 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 3 weeks ago #

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

  9. MichaelH
    moderator
    Posted 3 weeks ago #

    Probably want to use id and order=DESC.

  10. greenpeas
    Member
    Posted 2 weeks ago #

    Is there an option for using post date in orderby?

Reply

You must log in to post.

About this Topic