Home › Forums › Add-ons › Gallery Field › Empty array when ordering posts by meta_value › Reply To: Empty array when ordering posts by meta_value
(This is going to be interesting to work out since we’re in basically opposite time zones)
I will check the $post-ID in the morning when I get to the office, as well as testing a basic function, but everything else for the post is displaying properly…the name, permalink, even other metadata I’ve set using ACF and am accessing with get_field()
. The ONLY thing that isn’t working is that the gallery is returning an empty array rather than an array of images.
I am certain that the posts have gallery data, because on their individual pages the gallery is being displayed fine, and when I remove my pre_get_posts
filter, the galleries show up on the correct posts.
Thanks,
Ryan
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.