Support » Plugin: Query Multiple Taxonomies » Exclude Categories From Widget

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m interested as well.

    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.

    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?

    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.

    that works, thanx

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Exclude Categories From Widget’ is closed to new replies.