I'm creating an event page where we can add an event line-up. Such a line-up consists out of different speakers.
So I've create two custom post types:
On my event page you can select the created line-up. A repeater is used to add speakers (speaker post objects) to a specific line-up.
On my event page:
<?php /* * get the ID of the selected line-up */ $line_up = get_sub_field('line-up'); $line_up_id = $line_up->ID; ?> <?php /* * Looping over the speakers repeater within the selected line-up */ if( have_rows('speakers', $line_up_id) ): while( have_rows('speakers') ) : the_row(); $speaker_obj = get_sub_field('speaker_object'); $speaker_time = get_sub_field('speaker_time'); var_dump($speaker_obj); // there is no output endwhile; endif; ?>
But there is no output.