I think you should be able to do this with a tax_query
in your $args
.
I could not test this, and I also dont know how the query behaves with a meta and tax query in one.
But I would start with testing something like this:
'tax_query' => array(
array(
'taxonomy' => 'event_category', // the used taxonomy
'field' => 'term_id', // use ID or slug
'terms' => array( 2136 ), // term ID to exclude
'operator' => 'NOT IN', // "NOT IN" to exclude?, default "IN"
),
),
Some more infos in the offical codex.
Related Posts:
- WP Query with custom Shortcode
- Query multiple custom post types in single loop
- Inject post (from specific category) between posts in Loop
- retrieve thumbnail from post ID of best selling product in category
- How to create a WP_Query to search the Title or Tag?
- Modern Tribe Calendar wp-query with meta query not working at all
- How to display custom field on homepage
- Can an array be used as a meta_query value?
- Display related products with custom output
- How to get to a specific position in wp_query?
- Get category name from custom loop and echo it once
- Why is variable not working on custom sql query using wpdb?
- Create WP_Query to search for posts by their categories or their parent/child categories
- Advanced Meta Query for Large Calendar Website (12k+ posts) (175k+ wp_postmeta rows)
- Recent Posts Not Showing Only On A Specific Category Page [closed]
- Custom query, checking values of multiple meta keys
- Is it possible to retrieve all posts with a certain value for metadata?
- unable to use ‘new WP_Query’ in AJAX call
- How to add div blocks after certain set of post
- How to overwrite orderby with add_query_var
- WP_Query: getting posts where custom field exists
- How to display SQL query that ran in WC_Order_Query?
- Post not populating for custom post type based on category selection
- Passing an array into WP_Query as a variable
- WordPress meta_query >= &
- Do not duplicate posts with multiple categories in multiple loops
- Using multiple variables to assign categories to an array
- Display latest post from WordPress Featured Category that is also in X,Y,or Z categories
- How can I modify this code to make the search box include tags and meta
- Isn’t Returning Value While Using SELECT COUNT(*) FROM {$wpdb->prefix}
- Is it possible to order posts using multiple meta queries, i.e. show posts from first meta query, then the second?
- wp_Query with mutuplea values returns all posts
- meta_query search names when they have middle initials
- Category Page Displaying all Pages
- Usermeta data unserialize, extract and display in table in WordPress
- Meta query not showing result properly
- wordpress query returning unexpected results
- Query doesn’t display text data with apostrophes
- Efficient way of querying for a “fallback” post?
- How can I display a query in a page?
- Trying to exclude posts from a category on the home page
- Query seems to be duplicated
- Does wp_query and query_posts affect website performance? [duplicate]
- Hide empty categories from get_categories
- Fix incorrect related posts code snippet
- wp_query on search results page showing all results every time
- Show post like this image in my newssite [closed]
- Display all categories (with link) of custom post type – WordPress
- Three different queries on same page
- Exclude a category ID from the following function
- Display featured posts first, then display all others within a specific category in WordPress
- Display posts in correct month order using single date custom field
- WordPress query undefined offset in loop
- How to override url params with rewrite rules vars?
- Can I make get_users() query global?
- How to show meta value code HTML after x paragraph
- Form search query – displaying ACF “Post Object” field as results
- WP_Query | IF within $args array | Help me only add specific arguments if the argument is not blank
- In WordPress, how do I get the number of posts next to single_cat_title(”); in the category.php file?
- Use get() method to grab all categories and output inside another method
- Convert a string into a decimal number for use in query
- Issue with custom loop in Archive page
- get_the_ID() doesnt work
- Only show size attributes in product box woocommerce when available
- Array to string conversion on array_map
- Store metakey value as an array
- Increment paged on WP_Query
- Target post_date_gmt if it’s empty or not set
- Custom Post type slider with thumbnail navigation
- Hide posts if user is added to it WP_query
- User Meta Value not echoing despite Var_Dump Showing correct string
- How to get category name or ID by post?
- Custom post type category not displaying category ID
- Argument for if term-> have child?
- Parse error: syntax error, unexpected ‘}’ [closed]
- How to get current post category details inside “loop”?
- Custom route and query
- change the default order of posts only for specific categories
- How to separate categories with commas?
- Shortcode to pull posts
- Getting posts to exclude from array
- Get all posts as an array ID => Name
- PHP -> SQL Query with Summing
- How to insert wp_users ->user login name to wp_terms when a new user registering?
- Undefined offset: 0-wp-includes/meta.php:488 -Melding
- Show all tags within a category?
- Add new post in existing categories using wp_insert_post
- Custom query vars filters problem with pagination
- Custom post type permalinks do not appear using the link functions
- How to change logo by category
- extract serialized array to use for wp-query
- Problem with custom loop and wp_list_pluck [closed]
- Order BY Most Liked And Published Between Previous Week Monday And Next Week Monday
- Listing titles and custom fields of entries within subcategories
- WP_Query multiple post results
- Modify main query before it run without pre_get_post
- WordPress WP_Query without query GET parameters
- random display categories – change url
- Displaying list of posts in category page
- Echoing a CSS class based on category of post in a list