ACF: How to query for a given value count of an array like field? (e.g.: How many rows has a `flexible_content` field?)
How can I write a WordPress meta query that gives me an array of users/posts that have a given amount of entries in a custom field that stores multiple values?
Something like SQL COUNT()
, but for the number of entries in an ACF array field.
When writing a WP_Meta_Query
and comparing with ,
=
, etc. this doesn't seem to work for me, perhaps because the data is stored serialized.
So, basically, how can I perform a simple selection of records with a specific count inside their custom field value.
Topic advanced-custom-fields meta-query count wp-query custom-field Wordpress
Category Web