Added "Venue" to week view, shows same venue for all events.

Home Forums Calendar Products Events Calendar PRO Added "Venue" to week view, shows same venue for all events.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #965259
    Chris
    Participant

    Hi, I recently purchased the events calendar pro (awesome), but have hit a snag. While making some minor adjustments to the “single-event-allday.php” template file to try and get just the venue to show, nothing else. It’s working fine, except it shows the same venue for every event, and I can’t figure out what else to do. Tried using wp_reset_postdata() just for the heck of it and no beuno. If you could help me out that would be awesome.

    if ( ! defined( 'ABSPATH' ) ) {
    	die( '-1' );
    } ?>
    
    <?php if ( tribe_events_week_is_all_day_placeholder() ) : ?>
    	<div class="tribe-event-placeholder hentry vevent " data-event-id="<?php tribe_events_week_get_event_id(); ?>">&nbsp;</div>
    <?php else : $event = tribe_events_week_get_event(); ?>
    	<div id='tribe-events-event-<?php echo $event->ID; ?>' class='<?php echo tribe_events_event_classes( $event->ID ); ?> tribe-week-event' <?php tribe_events_the_header_attributes( 'week-all-day' ); ?> data-tribejson='<?php echo tribe_events_template_data( $event ); ?>'>
    		<div>
    			<h3 class="entry-title summary">
    				<a href="<?php tribe_event_link( $event ); ?>" class="url" rel="bookmark"><?php echo $event->post_title; ?></a>
    			</h3>
    			<?php tribe_get_template_part( 'modules/meta/venue' ); ?>
    		</div>
    	</div>
    	<?php wp_reset_postdata(); ?>
    <?php endif; ?>
    
    #965481
    Nico
    Member

    Hi Chris,

    Great to hear your enjoying the awesomeness in our products 😉

    A quick way to achieve what you are looking for is to paste the code from “modules/meta/venue.php” directly into “single-event-allday.php”, and input the current venue ID in the functions retrieving the venue data. With those changes your “single-event-allday.php” should look like this:

    https://gist.github.com/niconerd/526de72c0476d1efd6ce

    Let me know if this fix makes it work,
    Nico

    PS: Please bear in mind that many template overrides might need a refactor after upgrading to upcoming release 3.10.

    #966798
    Chris
    Participant

    Worked great, thanks!

    #966830
    Nico
    Member

    Glad to hear my friend 🙂 I’m going to close this topic – but please don’t hesitate to create new topics if you need help with anything else.

    Best,
    Nico

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Added "Venue" to week view, shows same venue for all events.’ is closed to new replies.