Tribe Events Calendar – Show Multiple Organizers in Template

Sourced here, this handy snippet can help you update your theme templates to show multiple organizers.

You can take this further, and modify the code to display it this information in a loop, or within a themed version of the template.

		<?php		
			$organizer_ids = tribe_get_organizer_ids();
			$multiple = count( $organizer_ids ) > 1;
		?>
		
		<div class="tribe-events-meta-group tribe-events-meta-group-organizer">
			<h3 class="event_venue organizer"><?php echo tribe_get_organizer_label( ! $multiple ); ?></h3>
				
				<?php
				do_action( 'tribe_events_single_meta_organizer_section_start' );
				foreach ( $organizer_ids as $organizer ) { ?>
				
					<p class="event_organizer">
					<?php if ( ! $organizer ) {
						continue;
					}
					?>
						<?php echo tribe_get_organizer( $organizer ) ?><br/>
					<?php
					$phone = tribe_get_organizer_phone( $organizer );
					$email = tribe_get_organizer_email( $organizer );
					$website = tribe_get_organizer_website_link( $organizer );
					if ( ! empty( $phone ) ) {
						?>
							<?php echo esc_html( $phone ); ?><br/>
						<?php
					}//end if
					if ( ! empty( $email ) ) {
						?>
							<?php echo esc_html( $email ); ?><br/>
						<?php
					}//end if
					if ( ! empty( $website ) ) {
						?>
							<?php echo $website; ?><br/>
						<?php
					}//end if ?>
					
					</p>
				<?php }//endforeach
				do_action( 'tribe_events_single_meta_organizer_section_end' );
				?>
		</div>

 

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.