Sorting Link Categories Manually (8 posts)

  1. SF49ER
    Posted 10 years ago #

    Currently, the only options for sorting Link Categories in 1.2 is by name, ID, url, rating, updated and random. I would like to control the sort order manually and be able to shift them around at will. Is this possible in this version?

  2. Mark McKibben
    Posted 10 years ago #

    Try using get_links, set the orderby to "notes" and then in the link manager add a note to each link that consists of the order you want it to show up. I.E. If you have Link_ABC, Link_DEF & Link_GHI that you want to display in this order:

    Add a note to Link_DEF of "1"
    Add a note to Link_ABC of "2"
    Add a note to Link_GHI of "3"

  3. SF49ER
    Posted 10 years ago #

    I believe this applies to links listed under a specific category. However, I would like to be able to position each link category
    manually and I don't see a Notes field when editing these.

  4. Mark (podz)
    Support Maven
    Posted 10 years ago #

  5. SF49ER
    Posted 10 years ago #

    Thanks to the both of you!!

  6. Manzabar: Thanks for the tip on using notes to sort links! =)

  7. Mark McKibben
    Posted 10 years ago #

    @SF49ER: In that case, you can either use Podz suggestion or you can do what I did for my Portal page. Each section of links down the main part of the page are being pulled via get_linksbyname with the category set for that section. I.E. The "Tech News" section is built from all the links that I entered in a category called "Tech News" and I've set the tag up like this:
    <?php get_linksbyname("Tech News", "<li>", "</li>", "", show_images, "name", false, false, -1, show_updated); ?>

    The next section of links is pulled using the same settings except category is set to "Blogs".

    @btvillarin: No problem, though I probably should mention I've not tried the technique out; I just noticed the options while looking at the Codex.

  8. In that case, for the record, that method does work. ;)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.