WordPress.org

Ready to get started?Download WordPress

Forums

Query Multiple Taxonomies
Exclude Categories From Widget (6 posts)

  1. ShadowRunSucks
    Member
    Posted 1 year ago #

    Is there anyway or workaround to exclude categories from the widget and not list them all?

    http://wordpress.org/extend/plugins/query-multiple-taxonomies/

  2. Tyrannous
    Member
    Posted 1 year ago #

    I'm interested as well.

  3. robby.crichlow
    Member
    Posted 1 year ago #

    The only way I figured out to do it is to go into widget.php in the plugin directory.

    On line 142 it uses the get_terms function, so you can alter the term list however you like.

    To exclude a specific category, just change that line to:
    return get_terms( $tax, array('exclude' => 4)); // change 4 to whatever category id you want removed

    Hope that helps.

  4. csf001
    Member
    Posted 11 months ago #

    it works only with one category.

    how can I manage this with excluding more than one category ?

    I tried it that way,

    'exclude' => 5,
    'exclude' => 12,

    `
    but it doesn´t work.

    who can help?

  5. robby.crichlow
    Member
    Posted 11 months ago #

    The easiest way to do that is to just do:
    'exclude' => '5,12'

    You can exclude how ever many you like just by using a string of comma-separated id's. Talks about it in the get_terms reference.

    Hope that helps.

  6. csf001
    Member
    Posted 11 months ago #

    that works, thanx

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.