Support

Account

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']