WordPress.org

Ready to get started?Download WordPress

Forums

Links Not Sorting (5 posts)

  1. Anonymous
    Unregistered
    Posted 10 years ago #

    OK, I'll admit I'm not the sharpest tool in the shed when it comes to web stuff, I'm an infrastructure geek...
    I did get WP up and running. Problem I am having now is with the links not sorting properly. Is there something else I should be doing other than using the manage links in the admin section? Both the links are in the same link catagory, but the entry for "DVDs" is sorting above the entry for "an Xbox List".
    Are the dropdowns intented to update immediatly or is there a save option im not seeing?

  2. m4yh3m
    Member
    Posted 10 years ago #

    BTW, that was me

  3. gregz
    Member
    Posted 10 years ago #

    Same problem here. Using CVS (yesterday) version.

  4. Mike Little
    Member
    Posted 10 years ago #

    Hi m4yh3m and gregz,
    When you mention dropdown are you talking about the one on the 'Manage Links' page? If so, that 'order by' dropdown only applies to the links displayed on the Manage Links page.
    To set the sort order for the display of the links on your blog template page, you need to click on 'Manage Link Categories'. From there you can specifiy a whole bunch of stuff about each link category including the sort order.
    Then, in your blog template, use <?php wp_get_links(2) ?> and your links for category two will be displayed using the settings from the manage link categories page. You can also say <?php wp_get_linksbyname('family links'); ?>.
    Note the sample index.php uses the deprecated get_links(-1) which gets all links regardless of category and individual category sort order. Finally there is get_links_list() which also lists all links but grouped into categories. Again it overrides the individual category settings.
    All these functions are documented in the wp-links/links.php file.
    Hope this helps,
    Mike

  5. trepryor
    Member
    Posted 9 years ago #

    I'm running 1.2.1 and haven't modified anything related to the links and they're still sorting by ID (when they were created) rather than by name.

    I've looked in

    /wp-includes/links.php

    and as far as I can tell, it's supposed to go with the default, right? here's the snippet:

    function get_links_list($order = 'name', $hide_if_empty = 'obsolete')

    What am I missing? TIA!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.