WordPress.org

Ready to get started?Download WordPress

Forums

Excluding One Link Category (4 posts)

  1. justkristin
    Member
    Posted 10 years ago #

    I would like to use get_links_list to show all but one category of links. Is this possible? Can I specify all the category IDs save that one, separated by commas or spaces? Other options? Thank you!

  2. gregorsmith
    Member
    Posted 10 years ago #

    from http://codex.wordpress.org/Template_Tags/list_cats:

    <?php list_cats(optionall, 'all', 'sort_column', 'sort_order', 'file', list, optiondates, optioncount, hide_empty, use_desc_for_title, children, child_of, 'categories', recurse, 'feed', 'feed_img', 'exclude', hierarchical); ?>

  3. rossz
    Member
    Posted 10 years ago #

    Untested, but you could probably add "AND link_catgegory != "category_name_to_omit" in the query on (about) line 551 of links.php

  4. justkristin
    Member
    Posted 10 years ago #

    Gregor: is that for listing categories of posts? or listing categories of links? or both? The article seems like it is for posts, but I will give it a shot... Rossz, if the above doesn't work, i might have to give that a shot. Certainly, tho, someone has wanted to exclude a category before...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.