Home › Forums › General Issues › images as choices in select field › Reply To: images as choices in select field
On your review page, set the post object field for the manufacturer to return the id of the manufacturer post.
/*
this would be somewhere in your post loop on review page
set the manufacturer field to return id of manufacturer post object
*/
$mf_post_id = get_field('manufacturer');
if ($mf_post_id) {
/*
$mf_post_id should hold the manufacturer post id where the image
image field is located. Now get the image field from that
manufacturer post
*/
$image = get_field('manufacturer_logo', $mf_post_id)
/*
$image should contain the value returned for the
logo image field on the manufacturer post
*/
}
Hope that explains it better.
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.