WordPress.org

Ready to get started?Download WordPress

Forums

Display only one link category in sidebar (8 posts)

  1. superjux
    Member
    Posted 7 years ago #

    Hi.

    I currently have five different categories for my links. I have since created a links page, and want only one category to display on my sidebar. Is this possible? If so, how?

    Any help is much appreciated.

    Thanks!

    Hilary

  2. Michael Bishop

    Posted 7 years ago #

    <?php wp_get_links(1); ?> Where the 1 is the link category ID#.

    Edit: I originally misread your post, so had conflicting information. You would use this code where ever it is you want your link category listed.
    So

  3. superjux
    Member
    Posted 7 years ago #

    Okay, thanks. Exactly where am I doing this though?

  4. icyflare
    Member
    Posted 7 years ago #

    this is pretty much what I've been looking for since http://wordpress.org/support/topic/73154?replies=11#post-382030

    You would do it under sidebar.php i believe

    Also, is there a way to include more than one?
    <?php wp_get_links(1,2); ?> perhaps? Also where can you find cateogry ID

  5. Michael Bishop

    Posted 7 years ago #

    To find your link cat ID, you go to Links, Link Categories, then you'll see all of your link categories, with the ID listed right after the name of the link.

    Hilary, if this is for your superjux site, then where it says blogs I read, you would replace the code with what I listed.

    Just post back if you run into problems.

  6. superjux
    Member
    Posted 7 years ago #

    So I just put it directly in my sidebar then?

    Awesome. Thanks, I'll give it a try tomorrow!

  7. superjux
    Member
    Posted 7 years ago #

    Okay, tried it. Unfortunately it didn't work. It just renamed each link category to the same name.

    Any other ideas?

    Thanks!

  8. superjux
    Member
    Posted 7 years ago #

    Okay nevermind, got it to work. Now I want to list each link category on a links page. I currently have them in a dropdown, but I don't really like it that way. I want it to look similar to my archives page. Any ideas?

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.