WordPress.org

Ready to get started?Download WordPress

Forums

Links on Sidebar (8 posts)

  1. varresa
    Member
    Posted 8 years ago #

    How can I make a link category NOT show up on the sidebar? Whenever I add a new category, it currently automatically adds itself to the sidebar.

    Thanks!

  2. jwurster
    Member
    Posted 8 years ago #

    In your sidebar, you probably have the wp_list_cats function. If you want to exclude a category, you need to know the category id and then modify the function call like:
    <?php wp_list_cats('sort_column=name&optioncount=1&exclude=10, 15'); ?>

  3. moshu
    Member
    Posted 8 years ago #

    @jwuerster - it is NOt catgeories; it's about Link Categorie

    @varresa, You should check out which template tag does what you want:
    http://codex.wordpress.org/Template_Tags#Links_Manager_tags
    (probably get_links)

  4. jwurster
    Member
    Posted 8 years ago #

    Sorry, I misunderstood. But with the links that you add, don't you have the option of making it visible or not or am I thinking about something else?

  5. moshu
    Member
    Posted 8 years ago #

    Again, it is not about individual links - it is about Link Categories. No "invisible" option for link categories, only for individual links.

  6. varresa
    Member
    Posted 8 years ago #

    Moshu -
    I checked out the link you sent, but didn't see anything that made sense to me. I did find a <?php get_links_list(); ?> in my sidebar.php code, but I don't know what to add to that to exclude 2 category IDs. I tried a few things, but I just got parse errors.

    Any more specifics?

    Thanks!
    Renée

  7. jwurster
    Member
    Posted 8 years ago #

    After doing a little more research, I found that you can use:
    <?php wp_get_links(1); ?>, where the number is the category id. Hopefully, this is not 3 strikes and I'm out.

  8. moshu
    Member
    Posted 8 years ago #

    jimmy, you are on the right track this time :)
    (and as I said above the same goes for get_links)

    varresa, there are several template tags that could be used - I was hoping (as I always do) that you'll actually read all that stuff about parameters, usage examples etc. I even gave you a hint to which tag to look at...
    When you find the one you want to use, replace the existing one and you'll be a happy blogger :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags