Support

Account

Home Forums Add-ons Repeater Field get acf field from custom post type within repeater Reply To: get acf field from custom post type within repeater

  • I got it to work with:

    <?php if( have_rows('pagina_links_footer', 'option') ): ?>
    <ul>
        <?php while ( have_rows('pagina_links_footer', 'option') ) : the_row(); ?>   
        <li>
            <?php $post_object = get_sub_field('pagina_link'); ?>
            <?php if( $post_object ): ?>
            <?php
            $pagina_link_title = get_the_title($post_object->ID);
            $pagina_link_url = get_field('link_url', $post_object->ID);
            ?>
                <a href="<?php echo $pagina_link_url;?>"><?php echo $pagina_link_title;?></a>
            <?php endif; ?>
        </li>
        <?php endwhile; ?>
    </ul>
    <?php endif; ?>