Hi there!
I am trying to do a wp query and filter on the ACF Gallery field. It doesn’t work. Can anyone help me out?
This is the query:
Array
(
[posts_per_page] => -1
[post_type] => portfolio
[post_status] => publish
[orderby] => date
[order] => DESC
[meta_query] => Array
(
[0] => Array
(
[key] => portfolio-gallery
[value] => $attachment
[type] => numeric
[compare] => IN
)
)
)
‘portfolio-gallery’ is a gallery field which puts out an array of image id’s.
The variable $attachment is an image id.
Thank you so much.