Support

Account

Home Forums General Issues Relationship Code Problem Reply To: Relationship Code Problem

  • Hi @homax

    Your result is an array containing post objects. This code should work:

    
    <?php $posts = get_field('myfieldname');
    if( $posts ): ?>
    	<?php foreach( $posts as $p): ?>
    		<?php echo get_the_title( $p->ID ); ?>
    	<?php endforeach; ?>
    <?php endif; ?>