Displaying Multiple Organizers Featured Images on Event Details Page

Home Forums Calendar Products Events Calendar PRO Displaying Multiple Organizers Featured Images on Event Details Page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1067091
    Brent Kozlowski
    Participant

    Hello,

    Follow-up to this thread:

    Linking Organizer Featured Image on Event Page

    I have two organizers for an event and the first organizers image is being used for both organizers. How do I display the individual thumbnails?

    Excerpt from details.php

    $organizer_id = tribe_get_organizer_id();
    $image = get_the_post_thumbnail($organizer_id, 'full', array( 'class' => 'vc_box_border_circle attachment-full', 'style' => 'border: 2px #ccc solid;padding: 0px;' ));
    $link = esc_url( get_permalink( $organizer_id ) );
    
    <dl>
    	foreach ( $organizer_ids as $organizer ) {
    			if ( ! $organizer ) {
    				continue;
    			}
    
    			?>
       <div class="row">
       <div class="col-sm-4">
             <?php echo "<a href='$link' rel='bookmark'>$image</a>"; ?>					
       </div>
    
       <div class="col-sm-8">
    	<h3 class="organizer-name" style="margin-bottom: 10px"><?php echo tribe_get_organizer( $organizer ) ?></h3>
       </div>
       </div>
    #1067101
    Brent Kozlowski
    Participant

    Apologies! After posting I realized that my variables were outside the loop and I needed to change “organizer_id” to “organizer”. Hopefully this will help someone else having a similar problem.

    $organizer_id = tribe_get_organizer_id();
    
    <dl>
        foreach ( $organizer_ids as $organizer ) {
                if ( ! $organizer ) {
                    continue;
                }
    
                $image = get_the_post_thumbnail($organizer, 'full', array( 'class' => 'vc_box_border_circle attachment-full', 'style' => 'border: 2px #ccc solid;padding: 0px;' ));
                $link = esc_url( get_permalink( $organizer ) );
     
                ?>
       <div class="row">
       <div class="col-sm-4">
             <?php echo "<a href='$link' rel='bookmark'>$image</a>"; ?>                    
       </div>
     
       <div class="col-sm-8">
        <h3 class="organizer-name" style="margin-bottom: 10px"><?php echo tribe_get_organizer( $organizer ) ?></h3>
       </div>
       </div>
    #1067283
    Geoff
    Member

    Right on! Thanks for following up and I’m glad to hear everything is working smoothly. Feel free to hit us up if any other questions pop up and we’d be happy to help. 🙂

    Cheers,
    Geoff

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Displaying Multiple Organizers Featured Images on Event Details Page’ is closed to new replies.