Home › Forums › Calendar Products › Events Calendar PRO › Venues not showing in List or Photo views
- This topic has 3 replies, 2 voices, and was last updated 7 years, 10 months ago by
robbieboy.
-
AuthorPosts
-
June 6, 2018 at 9:09 pm #1548088
robbieboy
ParticipantHi there,
I’m running the Event Calendar Pro and Community Events and have just noticed that the photo and list page do not show the venue name or address. The only items that display on these pages are the feature images, linked title, date and description. The venue does display on the event details page in the summary section. Any Ideas?Thanks,
RobJune 7, 2018 at 9:44 am #1548657Sky
KeymasterHi Rob!
I’m sorry to hear that you’re having issues with the venue displaying for your events. I will try to help you get this sorted.
By default, the venue does not display in the photo view, though it does in the list view. However, looking at your list view, it appears to have been heavily modified. Are you using a custom template override for the list view? Has the venue output been removed from the template? What happens if you temporarily remove the custom template and let the default list view template show? Does the venue display then?
Thanks,
SkyJune 7, 2018 at 11:15 am #1548714robbieboy
ParticipantThanks for the quick response! My bad on the list view. That was an old template we were using. I’ve removed the customization there and the event shows.
I grabbed the venue code out of the stock list single-event.php and created a custom template for the photo template in my themes directory. All is good now, thanks for your help! Here’s what I ended up with for single-event.php in photos incase anyone is interested:
<?php /** * Photo View Single Event * This file contains one event in the photo view * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/pro/photo/single-event.php * * @package TribeEventsCalendar * @version 4.4.8 */ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } ?> <?php global $post; ///// START CUSTOM TO SHOW VENUE // Setup an array of venue details for use later in the template $venue_details = tribe_get_venue_details(); // The address string via tribe_get_venue_details will often be populated even when there's // no address, so let's get the address string on its own for a couple of checks below. $venue_address = tribe_get_address(); // Venue $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; // Organizer $organizer = tribe_get_organizer(); ///// END CUSTOM TO SHOW VENUE ?> <div class="tribe-events-photo-event-wrap"> <?php echo tribe_event_featured_image( null, 'medium' ); ?> <div class="tribe-events-event-details tribe-clearfix"> <!-- Event Title --> <?php do_action( 'tribe_events_before_the_event_title' ); ?> <h2 class="tribe-events-list-event-title"> <a class="tribe-event-url" href="<?php echo esc_url( tribe_get_event_link() ); ?>" title="<?php the_title() ?>" rel="bookmark"> <?php the_title(); ?> </a> </h2> <?php do_action( 'tribe_events_after_the_event_title' ); ?> <!-- Event Meta --> <?php do_action( 'tribe_events_before_the_meta' ); ?> <div class="tribe-events-event-meta"> <div class="tribe-event-schedule-details"> <?php if ( ! empty( $post->distance ) ) : ?> <strong> [<?php echo tribe_get_distance_with_unit( $post->distance ); ?>]</strong> <?php endif; ?> <?php echo tribe_events_event_schedule_details(); ?> </div> </div><!-- .tribe-events-event-meta --> <!-- START CUSTOM TO SHOW VENUE --> <?php if ( $venue_details ) : ?> <!-- Venue Display Info --> <div class="tribe-events-venue-details"> <?php $address_delimiter = empty( $venue_address ) ? ' ' : ', '; // These details are already escaped in various ways earlier in the process. echo implode( $address_delimiter, $venue_details ); if ( tribe_show_google_map_link() ) { echo tribe_get_map_link_html(); } ?> </div> <!-- .tribe-events-venue-details --> <?php endif; ?> <!-- END CUSTOM TO SHOW VENUE --> <?php do_action( 'tribe_events_after_the_meta' ); ?> <!-- Event Content --> <?php do_action( 'tribe_events_before_the_content' ); ?> <div class="tribe-events-list-photo-description tribe-events-content"> <?php echo tribe_events_get_the_excerpt() ?> </div> <?php do_action( 'tribe_events_after_the_content' ) ?> </div><!-- /.tribe-events-event-details --> </div><!-- /.tribe-events-photo-event-wrap -->June 8, 2018 at 10:43 am #1549560Sky
KeymasterRob,
Great! Glad to hear that you figured out the issue.
Please let us know if you have any questions or issues in the future.
Thanks,
SkyJune 30, 2018 at 9:35 am #1565210Support Droid
KeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Venues not showing in List or Photo views’ is closed to new replies.
