Title: Posts Grid &#8211; Exclude Multiple Categories
Last modified: August 11, 2023

---

# Posts Grid – Exclude Multiple Categories

 *  Resolved [shaunbowen](https://wordpress.org/support/users/shaunbowen/)
 * (@shaunbowen)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/posts-grid-exclude-multiple-categories/)
 * Hi there, when using the ‘Posts Grid’ widget, I can successfully exclude a single
   category using an additional query like:
 * category__not_in=9
 * However, I can’t figure out the syntax for excluding **multiple categories**.
   The WordPress ‘Query Posts’ info doesn’t really help with this.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [livemesh](https://wordpress.org/support/users/livemesh/)
 * (@livemesh)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/posts-grid-exclude-multiple-categories/#post-16965364)
 * You can to ask this question in SiteOrigin forum. May be they parse the arguments
   into an array if you provided comma separated values since the parameter expects
   an array if you want to exclude multiple categories. Pls check with them once
   since we just use their standard query controls provided by SiteOrigin to accomplish
   this.
 * Pls let me know if no such option exists. I will try to provide a solution which
   filters the query programmatically in your child theme.
 *  Thread Starter [shaunbowen](https://wordpress.org/support/users/shaunbowen/)
 * (@shaunbowen)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/posts-grid-exclude-multiple-categories/#post-16972394)
 * I have actually managed to figure it out based on some deep Google searching!
   The syntax should actually be:
 *     ```wp-block-code
       cat=-9,-179,-180,-181,-182,-183,-184
       ```
   
 * I will mark this as resolved and then perhaps it could be added in the plugin
   widget, under the relevant box (to help future users).
 * As a side note, the query does not exclude the categories from showing in the
   filter section (if used). To get around this, I used this in my CSS:
 *     ```wp-block-code
       a[data-value=".term-9"],
       a[data-value=".term-179"],
       a[data-value=".term-180"],
       a[data-value=".term-181"],
       a[data-value=".term-182"],
       a[data-value=".term-183"],
       a[data-value=".term-184"] {
       	display: none !important;
       }
       ```
   
    -  This reply was modified 2 years, 10 months ago by [shaunbowen](https://wordpress.org/support/users/shaunbowen/).
 *  Plugin Author [livemesh](https://wordpress.org/support/users/livemesh/)
 * (@livemesh)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/posts-grid-exclude-multiple-categories/#post-16973041)
 * Was not aware of this. This should help everyone who is looking to solve this.
   Thanks for the posting.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Posts Grid – Exclude Multiple Categories’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/livemesh-siteorigin-widgets_f5f5f5.
   svg)
 * [Livemesh SiteOrigin Widgets](https://wordpress.org/plugins/livemesh-siteorigin-widgets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/livemesh-siteorigin-widgets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/livemesh-siteorigin-widgets/)
 * [Active Topics](https://wordpress.org/support/plugin/livemesh-siteorigin-widgets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/livemesh-siteorigin-widgets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/livemesh-siteorigin-widgets/reviews/)

## Tags

 * [exclude categories](https://wordpress.org/support/topic-tag/exclude-categories/)
 * [query](https://wordpress.org/support/topic-tag/query/)

 * 3 replies
 * 2 participants
 * Last reply from: [livemesh](https://wordpress.org/support/users/livemesh/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/posts-grid-exclude-multiple-categories/#post-16973041)
 * Status: resolved