Organizer Photo on events page

Home Forums Calendar Products Events Calendar PRO Organizer Photo on events page

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #960339
    rgaller
    Participant

    How do I add the organizers photo to the events page.

    #960409
    Josh
    Participant

    Hey Rayelle,

    Thanks for reaching out to us!

    With a little bit of customization, you can have the organizer’s photo show wherever you would like when displaying events. To start, you’ll need to figure out exactly which views you would like the organizer photo to display for.

    If, for example, you wanted the photo to display on the single-event view, you would follow our Themer’s Guide to copy the “single-event.php” file from our plugin and into your theme. Next you would add:

    
    get_the_post_thumbnail( tribe_get_organizer_id() );
    

    where you would like the photo to display. For more information about the function, check out the codex article for post thumbnails https://codex.wordpress.org/Function_Reference/get_the_post_thumbnail.

    Let me know if this helps.

    Thanks!

    #963649
    rgaller
    Participant

    would I add it like this?

    // Organizer
    $organizer = tribe_get_organizer();
    get_the_post_thumbnail( tribe_get_organizer_id() );
    ?>

    #963657
    rgaller
    Participant

    Where do I add the code?

    <?php
    /**
    * Single Event Template
    * A single event. This displays the event title, description, meta, and
    * optionally, the Google map for the event.
    *
    * Override this template in your own theme by creating a file at [your-theme]/tribe-events/single-event.php
    *
    * @package TribeEventsCalendar
    *
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    die( ‘-1’ );
    }

    $event_id = get_the_ID();

    ?>

    <div id=”tribe-events-content” class=”tribe-events-single vevent hentry”>

    <p class=”tribe-events-back”>
    “> <?php _e( ‘« All Events’, ‘tribe-events-calendar’ ) ?>
    </p>

    <!– Notices –>
    <?php tribe_events_the_notices() ?>

    <?php the_title( ‘<h2 class=”tribe-events-single-event-title summary entry-title”>’, ‘</h2>’ ); ?>

    <div class=”tribe-events-schedule updated published tribe-clearfix”>
    <?php echo tribe_events_event_schedule_details( $event_id, ‘<h3>’, ‘</h3>’ ); ?>
    <?php if ( tribe_get_cost() ) : ?>
    <span class=”tribe-events-divider”>|</span>
    <span class=”tribe-events-cost”><?php echo tribe_get_cost( null, true ) ?></span>
    <?php endif; ?>
    </div>

    <!– Event header –>
    <div id=”tribe-events-header” <?php tribe_events_the_header_attributes() ?>>
    <!– Navigation –>
    <h3 class=”tribe-events-visuallyhidden”><?php _e( ‘Event Navigation’, ‘tribe-events-calendar’ ) ?></h3>
    <ul class=”tribe-events-sub-nav”>
    <li class=”tribe-events-nav-previous”><?php tribe_the_prev_event_link( ‘<span>«</span> %title%’ ) ?>
    <li class=”tribe-events-nav-next”><?php tribe_the_next_event_link( ‘%title% <span>»</span>’ ) ?>

    <!– .tribe-events-sub-nav –>
    </div>
    <!– #tribe-events-header –>

    <?php while ( have_posts() ) : the_post(); ?>
    <div id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>
    <!– Event featured image, but exclude link –>
    <?php echo tribe_event_featured_image( $event_id, ‘full’, false ); ?>

    <!– Event content –>
    <?php do_action( ‘tribe_events_single_event_before_the_content’ ) ?>
    <div class=”tribe-events-single-event-description tribe-events-content entry-content description”>
    <?php the_content(); ?>
    </div>
    <!– .tribe-events-single-event-description –>
    <?php do_action( ‘tribe_events_single_event_after_the_content’ ) ?>

    <!– Event meta –>
    <?php do_action( ‘tribe_events_single_event_before_the_meta’ ) ?>
    <?php
    /**
    * The tribe_events_single_event_meta() function has been deprecated and has been
    * left in place only to help customers with existing meta factory customizations
    * to transition: if you are one of those users, please review the new meta templates
    * and make the switch!
    */
    if ( ! apply_filters( ‘tribe_events_single_event_meta_legacy_mode’, false ) ) {
    tribe_get_template_part( ‘modules/meta’ );
    } else {
    echo tribe_events_single_event_meta();
    }
    ?>
    <?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?>
    </div> <!– #post-x –>
    <?php if ( get_post_type() == TribeEvents::POSTTYPE && tribe_get_option( ‘showComments’, false ) ) comments_template() ?>
    <?php endwhile; ?>

    <!– Event footer –>
    <div id=”tribe-events-footer”>
    <!– Navigation –>
    <!– Navigation –>
    <h3 class=”tribe-events-visuallyhidden”><?php _e( ‘Event Navigation’, ‘tribe-events-calendar’ ) ?></h3>
    <ul class=”tribe-events-sub-nav”>
    <li class=”tribe-events-nav-previous”><?php tribe_the_prev_event_link( ‘<span>«</span> %title%’ ) ?>
    <li class=”tribe-events-nav-next”><?php tribe_the_next_event_link( ‘%title% <span>»</span>’ ) ?>

    <!– .tribe-events-sub-nav –>
    </div>
    <!– #tribe-events-footer –>

    </div><!– #tribe-events-content –>

    #964304
    Josh
    Participant

    Hey,

    Thanks for following up.

    To the first response, sure you can definitely format it that way by first assigning the organizer id to a variable.

    Secondly, you can really add it wherever you would like it to display within the template. Personally, I would probably add it between the “tribe-events-single-event-description” div within the template you’ve linked.

    Let me know if this helps.

    Thanks!

    #984177
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘Organizer Photo on events page’ is closed to new replies.