Support

Account

Home Forums Front-end Issues Post Object Field in Events Calendar Meta Details Section Reply To: Post Object Field in Events Calendar Meta Details Section

  • Got it! If this is of any use to anyone else, here is the working template:

    <?php
    /**
     * Single Event Meta (Organizer) Template
     *
     * Override this template in your own theme by creating a file at:
     * [your-theme]/tribe-events/modules/meta/organizer.php
     *
     * @package TribeEventsCalendar
     * @version 4.4
     */
    
    ?>
    
    <div class="tribe-events-meta-group tribe-events-meta-group-organizer">
    	<h3 class="tribe-events-single-section-title"><?php echo "Organizers"; ?></h3>
    	<dl>
    		
    	<?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>
    			<dd class="tribe-organizer">
    	    	<a href="<?php echo get_permalink( $p->ID ); ?>"><?php echo get_the_title( $p->ID ); ?></a>
    	    	<?php the_field('author', $p->ID); ?>
    	    </dd>
    	<?php endforeach; ?>
    	
    	<?php do_action( 'tribe_events_single_meta_organizer_section_end' ); 
    		?>
    	</dl>
    </div>