Straight from the codex
value
(string|array) – Custom field value. It can be an array only when compare is ‘IN’, ‘NOT IN’, ‘BETWEEN’, or ‘NOT BETWEEN’.
SOLUTION
Change compare' => '!='
to compare' => 'NOT IN'
Related Posts:
- Display products from specific category in shop page
- How to query ‘posts_per_page’ to display a different blog posts index template?
- Query sticky posts with thumbnails
- WP_Query on custom field and order results
- Any number in meta key (wp query)
- Array as ‘key’ in WP_Query
- How to provide meta_key array to wp_query?
- Wp_query with 2 meta keys and array of meta values
- Meta query compare for ID’s greater than specific ID
- Use have_posts() with array of post results retrieved by $wpdb->get_results
- WP_Query not returning correct result with meta_query parameter
- show most viewed post
- Meta Query if Values Don’t Exist
- Custom loop – Isolating post meta output depending on current query taxonomy terms
- Meta_query compare operator explanation
- Can I force WP_Query to return no results?
- meta_query ‘compare’ => ‘IN’ not working
- Multiple WP_Query loops with Pagination
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query and next_posts_link
- WP_Query with checkbox meta_query
- Too slow when using both ‘tax_query’ and ‘meta_query’ both in WP_Query
- Get array of posts from the current archive page loop
- How can I save an array from a random post sequence for later use?
- Meta Query with date and time on the same Day before given time
- In loop: posts have thumbnail AND other variables
- How to grab metabox value in wp_query meta_query key
- How to order category.php loop by ‘meta_value’?
- Add inline HTML to posts published within last 24hrs
- Move posts to top of WP_Query if in certain Taxonomy?
- Display different number of posts from one category on the different pages
- How to change a custom query into a standard loop?
- Sort users by meta_value_num
- meta_query with array as value
- exclude custom post type by meta key in wp_query
- Using WP Query to search within ALL keys in meta query
- WP Query – Get WooCommerce Products with variation that is in stock
- Meta_query with or without value
- wordpress query in header won’t reset and corrupts other loops
- 2 loops on page – one with orderby rand second orderby date
- Undefined WP_Query::has_posts()?
- wp_query not searching with apostrophe
- How to use WP_Query to display many posts?
- Counter problem, infinite loop when post_per_page equals X
- Custom query based on meta key – Reduce three states to two in results?
- Five posts from a category in footer
- Performance when getting post meta for post retrieved by meta value
- How to get all unique categories for posts in loop?
- How to display multiple custom fields with the same meta_key in an ascending order?
- Using the_post_thumbnail resets current loop item ID
- Meta_query with multiple keys and multiple values
- Order by empty custom field
- Tax query AND/OR meta query [duplicate]
- Help ordering Post loop by two meta values
- New WP_Query loop in admin causes problems
- Need to convert string of term ids into comma separated integers for use in an arguments array
- How do I get my custom query to work with search results after the first page?
- Issue with front page navigation after upgrading to 3.4
- Exclude recently updated post from custom WP_Query using multiple loops
- get_posts output always same post
- How to use WP_Query() on single.php?
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Loop increase in while loop not working
- Is this meta query problematic?
- posts archive page – closing WP_Query loop correctly [closed]
- Appending to existing WP_Query’s meta_query if exists
- AJAX Breaking Offset Argument In WP Query
- Continue or break the while loop
- Get meta_value of a specific meta_key from all posts belonging to a specific custom type
- Custom query filter by ACF date custom field
- Nested array issue in meta_query
- Does putting queries within loops cause an issue on WordPress?
- Function using get_posts() with tax_query not working when called from functions.php
- meta_query with array as value with multiple arrays
- Why doesn’t my WP Meta Query return any results?
- How to make the ‘request’ filter work?
- meta_query – check for multiple meta values in key which holds an array of values
- How do I stop the same post showing multiple times in a archive?
- Searching for a specific month in a metadata saved as Timestamp (Wp_Query)
- how to get custom attachment url?
- WP_Query on custom key and value
- Get posts having meta value between two numbers
- How to set meta_query if get_post_meta returns nested array for that key? [duplicate]
- Sorting with meta_query and multiple, optional meta keys
- WP_Query & Duplicate entries
- Query by meta value (add a dropdown of all values)
- Calling a function with WP_Query only ever brings the first result
- query_posts() doesn’t seem to be called in my page
- WP_Query returns empty if meta_query has more than 7 values
- WordPress meta_query not working
- Create multiple sections for all categories and then queries all the posts for each of those categories
- Next / previous posts link doesn’t show up with Posts 2 Posts
- Passing conditional arrays to WP_Query() [closed]
- Carousel Loop only duplicating
- How to show featured post first, then separate loop for other posts
- Get all user with both meta_value
- How to get all post_id and meta_value using meta_key in wp_postmeta table
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?
- Show number of posts AND number on current page (cannot make it work)