WordPress.org

Ready to get started?Download WordPress

Forums

Links on Main Page AND Separate Page, Different Order (3 posts)

  1. Amulet
    Member
    Posted 9 years ago #

    Ok, here's what I want to do:

    I want a separate links page that shows ALL categories and ALL links, sorted by name. I also want the main page to show link categories that have links (all others should be hidden), but I want the links that show to be in random order, with a set limit showing.

    get_links_list() works great for this, except I can't have BOTH all links showing in one place and some links showing in the other. I've tried get_linksbyname, get_links, and one or two similar options, but I can't find a way to do what I describe above. I'd appreciate any help. Thank you.

  2. Michael Bishop

    Posted 9 years ago #

    when you say "main page", are you refering to the sidebar on the index.php?
    If so, perhaps using wp_get_links in the sidebar, and setting the parameters in the manage links tab of the admin panel will do the trick. If not, perhaps be more specific when you say "main page".

  3. Amulet
    Member
    Posted 9 years ago #

    Sorry I didn't get back to this sooner...Yes, I mean the sidebar. I've set the parameters in the manage links tab, but those settings apply to wherever I put wp_get_links (which is both on the links page I created and in the sidebar). I want a links page that lists all the links and categories, in alphabetical order (to be clear, the categories are listed in alphabetical order, and then the links under each cat are sorted in alphabetical order), and then in the sidebar, I want to limit how many links under each category are shown, and I want those sorted in random order. Is there a way to do this?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags