Add organizer to Event list page in 3.11

Home Forums Calendar Products Events Calendar PRO Add organizer to Event list page in 3.11

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #990611
    media325
    Participant

    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?

    #990681
    Brian
    Keymaster

    Hi,

    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

    #990704
    media325
    Participant

    Thanks, 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
    		        } ?>
    #990706
    Brian
    Keymaster

    Great 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Add organizer to Event list page in 3.11’ is closed to new replies.