Home › Forums › General Issues › Get the ID of an image field set to return the URL › Reply To: Get the ID of an image field set to return the URL
WOW John!!! I had never noticed that 3rd parameter. Indeed that was exactly what I wanted! If only I had your answer yesterday, I wouldn’t have resourced in directly querying the DB…
$_poster = $wpdb->get_results("SELECT meta_value FROM {$wpdb->prefix}postmeta WHERE meta_key = 'movie_poster' AND post_id = {$post->ID};", ARRAY_A)[0]['meta_value'];
But I’ll update my code as your solution is much more clean! Thanks a lot!
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.