It seems the 'type' => 'string'
is not right
From the codex
type (string) – Custom field type. Possible values are ‘NUMERIC’, ‘BINARY’, ‘CHAR’, ‘DATE’, ‘DATETIME’, ‘DECIMAL’, ‘SIGNED’, ‘TIME’, ‘UNSIGNED’. Default value is ‘CHAR’.
try and remove the above line from the code and check or try using the below instead.
'type' => 'CHAR'
Related Posts:
- meta_query ‘compare’ => ‘IN’ not working
- Ignoring initial articles (like ‘a’, ‘an’ or ‘the’) when sorting queries?
- Sorting: custom query with orderby meta_value_num THEN by title
- WP_Query and next_posts_link
- Sanitation needed for WP_Query or get_posts calls?
- how does $wpdb differ to WP_Query?
- WP_Query – filter or directly?
- replace the WP_Query class in the main query
- How can I save an array from a random post sequence for later use?
- Why is WP-Query spelled like it is?
- Get posts with condition on comment meta value
- WP_Query sort by comment meta data
- Limit search results to exact match
- Display different number of posts from one category on the different pages
- How to display child posts in the parent category
- WP_Query hit max joins… How else can I build a search function that uses custom fields?
- How to count data records in wordpress which have same meta_value in wp_postmeta table?
- Order terms inside a select dropdown
- How to speed up wp_query, took more 5s to run against 100k posts
- How to sort posts in admin by titles with dd.mm.yyyy format?
- Transient caching for wp query
- WP_Query orderby breaks when using AJAX?
- Custom WP Query from meta_value stored as serialised array
- How to check if a post “does not have term” in conditional statement?
- Detect featured image among the attached images
- Pass arguments to WP_Query using “set” method
- WP_Query arguments to fetch custom post type posts which are in certain category?
- WP_Query loop within WP_Query loop
- Search Posts with Custom Fields as query
- Make WP_Query more efficient?
- Set order of returned items in the WP_Query() class/function
- Use query->set or make new query?
- How to fetch only media that was already attached to a post/page?
- (Solved) WP_Query ($ args) -> How to sort letters and numbers within the same array
- WP_Query won’t retrieve raw HTML?
- Remove a specific category ID from related post
- Which method is faster to get a single post?
- Show Sticky Post at the top but do not show again in the loop?
- Any number in meta key (wp query)
- Custom Metabox data slow query on Admin init
- Use Repository Pattern in WP theme
- WordPress Comments sort by custom meta key
- Order by summing multiple values
- Understanding the orderby in WP_Query?
- add_filter(‘query_vars’) not working in custom template
- Out Of memory issue on post per page parameter
- query_vars overriding WP_Query args
- Avoid repeated post on page 2 when excluding one on page 1
- Why post__not_in is ignored?
- find posts that don’t have a custom taxonomy
- How should I approach changing the template & $query as part of a shortcode’s execution?
- Exclude All Posts Which Do Not Have A Tag Assigned
- pre_get_posts – Trying to get property of non-object warning
- Replacing search results with custom external query
- WordPress Custom Search Form Displaying Unexpected Results
- WP_Query array key / value pairs?
- Get posts from multiple tax terms
- Stomping WP_Query in author archive to facilitate pagination with custom queries
- Limit number of posts in loop
- How do I get Woocommerce product variation name and variation description in a WP_Query?
- WP_Query offset is returning post from prevois loop
- Tax query is not working!
- Does WP_Query ‘responds’ badly to empty arguments?
- Does putting queries within loops cause an issue on WordPress?
- How to create Page templates for showing Blog posts in different layouts?
- Determining what post is displayed out of total posts found
- Reordering content using a meta value
- Adding query parameter to archive page returns 404
- Optimising WP_Query with ACF Fields
- Is it normal that get_post() gets run 300 times and the content of those posts aren’t visible?
- WordPress AJAX Request returns 400
- Using wpdb prepare with a variable, turns it into a big string
- WordPress Sub Category Archive, Show Extra Empty Page Number in Pagination
- SQL to join u3g_users & u3g_meta_value with repeating data
- WP_Query no result if keyword contains number
- WP_QUERY order posts by two combined meta_value dates
- How to get meta key list efficiently?
- Order by value of Custom Field using url string
- update_post_meta performance in a loop woocommerce
- Separate by Category Post Type
- ACF: using two loops, the_field returns field content from another loop
- Using modified ‘meta_key’ to set ‘orderby’ in WP_Query?
- Combine WP_Query with array of custom data to single loop without breaking the pagination
- query_posts() doesn’t seem to be called in my page
- Query posts in current category but not attachment format
- WP_Query with Pagination and orderby meta_value_num showing duplicates
- Optimising specific Query with ACF meta objects
- How to get several fields from wp_query?
- Slow getting posts from category
- Pagination not working with WP_Query (creates links but no page)
- WP Query posts__in not working with array
- query_posts with sorting on a custom datestamp
- Query Posts by date range with fixed beginning and end
- Is it possible to use WP Query to orderby custom meta value and custom taxonomy?
- Display all custom meta field values from the database using ACF Repeater
- How to create a loop inside WP_Query?
- how to show only catergory titles on a page in wordpress
- WP Query – Show custom posts only if user contain some user meta
- How do I subquery with custom meta fields?
- Advanced Search – Is this possible?