I am successfully outputting my relationship meta field values on the front end of single events pages with the following code:
<div class="tribe-events-meta-group tribe-events-meta-group-organizer">
<h3 class="tribe-events-single-section-title"><?php echo "Organizers"; ?></h3>
<?php $posts = get_field('the_organizers');?>
<?php foreach( $posts as $p ): // variable must NOT be called $post (IMPORTANT) ?>
<dt style="display:none;"><?php // This element is just to make sure we have a valid HTML ?></dt>
<a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?></a>
<?php the_field('author', $p->ID); ?>
<?php endforeach; ?>
<?php do_action( 'tribe_events_single_meta_organizer_section_end' );
By default, the native Organizer custom post type of The Events Calendar outputs all events an individual organizer is part of inside of an events loop on that respective organizer’s Single Organizer Page.
However, only if the individual is selected under the native Organizers meta section will the event be added to that organizer/speaker’s upcoming events loop.
Is there a way to call all related instances of the ACF relationship field into the tribe_events_loop as well?
This is my failed attempt:
// Use the tribe_events_single_organizer_posts_per_page to filter the number of events to get here.
echo tribe_organizer_upcoming_events( $organizer_id );
echo tribe_organizer_upcoming_events( $variable );
$variable = get_field('the_organizers', $post->ID);?>