Home › Forums › General Issues › Use of get_field in multisite › Reply To: Use of get_field in multisite
Hi @elliot, thanks for reply again.
So just a thought.
$images = get_field('gallery-field', $post->ID);
if( $images ):
foreach( $images as $image ):
echo '<li style="text-align:center !important;">';
echo '<a href="'.get_permalink($post->ID).'">';
echo '<img src="'.$image['sizes']['large'].'" alt="'.$img_alt.'" />';
echo '</a>';
echo '</li>';
endforeach;
endif;
This form would be the correct way? For that he pull the first image from the Gallery in multsite?
$image['sizes']['large']
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.