I have a repeater field for Post Objects from which I want to obtain the title, excerpt and featured img values. So, these are NOT sub_fields, just common fields.
If I use the example code:
<?php $post_objects = get_field('articulos_repeater'); if( $post_objects ): ?> <ul> <?php foreach( $post_objects as $post_object): ?> <li> <a href="<?php echo get_permalink($post_object->ID); ?>"><?php echo get_the_title($post_object->ID); ?></a> <span>Post Object Custom Field: <?php the_field('field_name', $post_object->ID); ?></span> </li> <?php endforeach; ?> </ul> <?php endif; ?>
I get the values of the current page. But if I
I get the (in this case) four individual array objects I need.
Why is this happening?