Home › Forums › Calendar Products › Events Calendar PRO › Add organizer to Event list page in 3.11
- This topic has 3 replies, 2 voices, and was last updated 8 years, 8 months ago by Brian.
-
AuthorPosts
-
July 27, 2015 at 10:25 am #990611media325Participant
In previous versions I was abe to add the organizer name and link by following https://theeventscalendar.com/support/forums/topic/organizer-photo-on-events-page/ and https://theeventscalendar.com/knowledgebase/themers-guide/#examples
With v3.11 the single-event.php has changed quite a bit now calling functions much more it seems. Are there new examples showing how to modify the event list page?
July 27, 2015 at 12:53 pm #990681BrianKeymasterHi,
Thanks for using our plugins. I can help out here.
With 3.11 we introduced the ability to add multiple organizers to an event.
We have updated coding in this file:
the-events-calendar\src\views\modules\meta\organizer.php
Using this coding might work for you:
<?php $organizer_ids = tribe_get_organizer_ids();
foreach ( $organizer_ids as $organizer ) {
if ( ! $organizer ) {
continue;
}?>
<span class="org">
<?php echo tribe_get_organizer( $organizer ) ?>
</span >
<?php
} ?>
Let me know if that works for you.
Thanks
July 27, 2015 at 1:35 pm #990704media325ParticipantThanks, that did it. I’ve expanded upon your code a little. I’ve used the organizer link and added a separator between organizers.
<!-- Organizer Display Info --> <?php $organizer_ids = tribe_get_organizer_ids(); $bg_Org_Count = 1; foreach ( $organizer_ids as $organizer ) { $bg_Comma = $bg_Org_Count++ < count($organizer_ids) ? "," : ""; if ( ! $organizer ) { continue; } ?> <span class="org"> <?php echo tribe_get_organizer_link( $organizer ); ?> </span ><?=$bg_Comma?> <?php } ?>
July 27, 2015 at 1:37 pm #990706BrianKeymasterGreat glad it helps and thanks for sharing the coding.
I am going to close this ticket, but if you need anything else related to this topic or another please post a new topic on the forum and we can help you out.
Thanks
-
AuthorPosts
- The topic ‘Add organizer to Event list page in 3.11’ is closed to new replies.