Query Multiple Taxonomies
Exclude Categories From Widget (6 posts)

  1. ShadowRunSucks
    Posted 3 years ago #

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


  2. tyrann0us
    Posted 3 years ago #

    I'm interested as well.

  3. robby.crichlow
    Posted 3 years 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
    Posted 2 years 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
    Posted 2 years 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
    Posted 2 years ago #

    that works, thanx

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Query Multiple Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.