Home › Forums › Calendar Products › Events Calendar PRO › No Google Map in Calendar Events in Custom Theme
- This topic has 10 replies, 3 voices, and was last updated 10 years, 1 month ago by
Support Droid.
-
AuthorPosts
-
March 4, 2016 at 12:41 pm #1085343
Byron
ParticipantI can’t get the google map to display in calendar events in any browser on my site.
After messing with plugins and themes, I’ve determined that the issue is probably with my custom theme.
The map is displayed correctly if I leave all of my plugins enabled but switch themes to 2015.I’ve checked the JS error console and there are no errors. The fact that the map works in the 2015 theme makes me think that I’m missing a JS include or something in my theme but I’m not sure how to proceed.
March 8, 2016 at 7:22 am #1086222Josh
ParticipantHey Byron,
Thanks for reaching out to us as well as starting with the testing procedures!
There could be some template overrides or use of deprecated functions in your theme that could be causing an issue here. Is there a “tribe-events” folder within your theme or are there any “tribe” based hooks utilized in your theme’s functions.php?
Thanks!
March 10, 2016 at 6:13 am #1087120Byron
ParticipantSorry for delay in reply.
No tribe hooks in the functions.php
Yes there is tribe-events folder in the theme rootMarch 11, 2016 at 6:25 am #1087680Josh
ParticipantHey Byron,
Thanks for following up with us!
There could potentially be some template overrides within that tribe-events.php file that have the map information removed from being displayed. If you could, take a look within that folder and see if there are any “single-event.php” files or a “modules” folder. If so, could you send the contents from those files (in a gist if you’d like) as a response here and I’ll see if there is anything stands out in those.
Thanks!
March 11, 2016 at 6:28 am #1087682Byron
ParticipantWhat?
So how do I get the maps to show up?March 11, 2016 at 6:29 am #1087687Byron
ParticipantOh, sorry I see some notes in the email.
March 11, 2016 at 6:34 am #1087693Byron
ParticipantHere is contents tribe-events/list/single-event.php:
<?php /** * List View Single Event * This file contains one event in the list view * * Override this template in your own theme by creating a file at [your-theme]/tribe-events/list/single-event.php * * @package TribeEventsCalendar * */ if ( ! defined( 'ABSPATH' ) ) { die( '-1' ); } <div class="seventy-five">1234 // Setup an array of venue details for use later in the template $venue_details = tribe_get_venue_details(); // Venue $has_venue_address = ( ! empty( $venue_details['address'] ) ) ? ' location' : ''; // Organizer $organizer = tribe_get_organizer(); ?> <!-- Event Cost --> <?php if ( tribe_get_cost() ) : ?> <div class="tribe-events-event-cost"> <span><?php echo tribe_get_cost( null, true ); ?></span> </div> <?php endif; ?> <!-- 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_attribute() ?>" rel="bookmark"> <?php the_title() ?>123 </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="author <?php echo esc_attr( $has_venue_address ); ?>"> <!-- Schedule & Recurrence Details --> <div class="tribe-event-schedule-details"> <?php echo tribe_events_event_schedule_details() ?> </div> <?php if ( $venue_details ) : ?> <!-- Venue Display Info --> <div class="tribe-events-venue-details"> <?php echo implode( ', ', $venue_details ); ?> </div> <!-- .tribe-events-venue-details --> <?php endif; ?> </div> </div><!-- .tribe-events-event-meta --> <?php do_action( 'tribe_events_after_the_meta' ) ?> <!-- Event Image --> <?php echo tribe_event_featured_image( null, 'medium' ) ?> <!-- Event Content --> <?php do_action( 'tribe_events_before_the_content' ) ?> <div class="tribe-events-list-event-description tribe-events-content"> <?php echo tribe_events_get_the_excerpt(); ?> <a href="<?php echo esc_url( tribe_get_event_link() ); ?>" class="tribe-events-read-more" rel="bookmark"><?php esc_html_e( 'Find out more', 'the-events-calendar' ) ?> »</a> </div><!-- .tribe-events-list-event-description --> </div><!-- /seventy-five --> <?php get_sidebar(); ?> <?php get_sidebar('cooltype'); ?> <?php do_action( 'tribe_events_after_the_content' );March 14, 2016 at 6:13 am #1088382Josh
ParticipantHey Byron,
Thanks for sending over the code for this file!
Out of curiosity, where was this file at within the “tribe-events” folder in your theme? Was it in the root of that folder or was it in a “list” folder within that folder?
The template that you’ve added here is a customized version of the template that is used to display the single events within the list view and not the event on the event single page. This template doesn’t have the “modules/meta” inclusion that is found within the main “single-event.php” file that you can find in the root of the “views” folder within the main Events Calendar plugin.
Thanks!
March 14, 2016 at 7:06 am #1088400Byron
ParticipantThis is where the file is located:
theme root/tribe-events/list/single-eventDo you mean this?
<!– Event meta –>
<?php do_action( ‘tribe_events_single_event_before_the_meta’ ) ?>
<?php tribe_get_template_part( ‘modules/meta’ ); ?>
<?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?>I tried adding that bit of code in several ways, no improvement.
Another person at our office added that folder to the root (I assume) trying to fix this problem.
I removed it and there was no change. Do you have any other idea what’s wrong?March 15, 2016 at 10:17 am #1089227Josh
ParticipantHey Byron,
If the file is within your theme at tribe-events/list/single-event.php it wouldn’t be impacted the single event page. That file would just be impacting how the single events display within the list view of the calendar.
Other than the Testing for Conflicts procedures, the other things that I would verify would be:
- that the events have associated Venues and that the venues have proper addresses set for them. Both of those are needed for the maps to work properly on the page.
- Check the Event Settings > General tab and verify that the setting is selected to display the maps https://cloudup.com/cNW13pfkL5v
Let me know if this helps.
Thanks!
March 30, 2016 at 9:35 am #1095960Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘No Google Map in Calendar Events in Custom Theme’ is closed to new replies.
