Home › Forums › General Issues › Getting ACF post_object inside wp_query › Reply To: Getting ACF post_object inside wp_query
I do not see you using the second argument anywhere. Assuming that event_details
is a field of $post
, you should pass the post ID at least to have_rows()
. In case this is not it, we should find out where exactly the problem occurs:
$post
is being populated as intended?$post
is “ID” and not “id” or “post_id”?get_the_ID()
you are asking for the ID of the current main loop item, for which you have called the template?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.