Home Forums ACF PRO Relationship from a custom post types Reply To: Relationship from a custom post types

  • if you’re trying to get the images from the related posts then you need to get those fields inside of the loop for those posts

    $posts = get_field('correlati_vini');
    if( $posts ): ?>
    <div class="wine-list">
     <div class="row row-news ">
     <?php foreach( $posts as $post): // variable must be called $post (IMPORTANT) ?>
          $image = get_field('copertina_libro');
          $correlata = get_field('copertina_libro_correlata');
          $size = 'thumbs-liste'; // (utilizzo la mia dimensione personalizzata)
          $sizefull = 'full'; // (utilizzo la dimensione originale)
        <div class="col-md-4">
            <div class="featured-image">
              <a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><img class="img-responsive" src="<?php echo wp_get_attachment_image( $image, $size ); ?>" /></a>