Viewing 14 replies - 1 through 14 (of 14 total)
  • Had same issue – my fix was to remove the API call for Google maps in the Avada footer.php file. This will only work though if you do not need a map displayed on any other page using the built in map that comes with Avada. If you use the built in contact page with the map or display a map on any other page/widget then you cannot remove this.

    The problem is the conflicting API calls – only way I can think to get it to work with both, would be to duplicate the Avada footer.php and leave footer.php alone, rename your duplicate to maybe footer2.php – remove the Google API call from that. Then create a new template file to assign to the events pages that calls the new footer2.php instead of the Avada default footer.php.

    I’m sure you could modify the API call in the footer to an IF statement to not load if the events template is used, but I’m not savvy enough for that one!

    my site is not the map of google and I do not understand this solution.
    I can not do anything?

    Hi plotino,

    Do you use Avada as your site template?

    Thanks for reply, I have solved the conflict was two Mennecke google API. thus:
    add_action (‘wp_enqueue_scripts’, ‘tribe_dequeue_google_maps’, 11);
    tribe_dequeue_google_maps function () {
    wp_dequeue_script (‘gmaps’);
    }
    ?
    Now I wanted to get the thumbnails of the pictures in the list of events in witdgts, know how he could do?

    I’m not 100% sure how yet – I’m still working through their structure. But take a look here:

    https://docs.tri.be/Events-Calendar/

    In particular the call: tribe_event_featured_image

    With some formatting and such you should be able to get it setup to display the image.

    for this: in the pluing
    wp-content/plugins/the-events-calendar/views/widgets/list-widget.php
    for this: <h4 class=”entry-title summary”>
    ” rel = “bookmark”> <php the_title ();> </ a>
    </ h4>
    above and add this link:
    <? php echo tribe_event_featured_image (null, ‘thumbnail’)>

    will be solved

    Barry

    (@barryhughes-1)

    Hi larsgj (and everyone): unfortunately we can’t help with integration issues in relation to commercial/non-standard themes here, but it’s great to see solutions being shared ??

    Remember to wrap code in backticks!

    Hi,

    I ran into the same problem, and couldn’t just remove the API call in the footer since I used it on another page. I figured the best way to get it working was to use a conditional tag on the API call in the footer. Here are two quick and easy, albeit somewhat dirty fixes I came up with:

    1st Method:
    If you didn’t do that already, create a child theme. After copying the footer.php into your child theme, open it and find the line starting with:
    <?php if(!$data['status_gmap']): ?><script type="text/javascript" [...]

    Modify the if clause:

    <?php if(!$data['status_gmap'] && ! has_tag('gmap')): ?>

    Now, just tag any event that includes a Google Map with the tag “gmap”.
    The advantage of this method is that it uses a child theme and will keep working when you update your theme. Also, you can use the tag on any post, not just events, so you can include Maps anywhere as long as you tag the post with “gmap”. The disadvantage is you have to remember to use the tag on every event manually or it won’t work.

    2nd Method:
    You can use this code to make The Events Calendar submit events with the post type “events” instead of the default “post”.
    After that, you use pretty much the same method as before, changing the conditional sentence to

    <?php if(!$data['status_gmap'] && ! ( 'events' == get_post_type() )): ?>

    The advantage here is that it’s automated and you can’t forget anything. It also adds the feature of having your events clearly defined as their own post type for any other possible modifications.
    The negative aspect is that WordPress doesn’t offer child plugins like it does for themes, so you’ll have to make the changes to the post type in the plugin itself and they will be gone when it updates. Also, you can’t use this method to block the API call on regular posts.

    I used the first method myself, because I liked the flexibility of it working on other post types.

    Plugin Contributor leahkoerper

    (@leahkoerper)

    Thanks for sharing maef!

    Used 1st Method, however tested post type instead of tag using tribe_is_event()

    <?php if(!$data['status_gmap'] && ! tribe_is_event()): ?>

    How did I miss that function? Guess I just got tangled up in the theme instead of the plugin. That’s so much better and easier than what I did.

    Immediately changed it to your code, thanks man.

    Only got there in the first place because of you post, thanks for sharing!

    @dotlicious
    i created a child theme
    i uploaded footer.php into child them
    i openned it and replaced:
    <?php if(!$data[‘status_gmap’]?>
    with:
    <?php if(!$data[‘status_gmap’] && ! tribe_is_event()): ?>

    Google maps still doesn’t show in the single event page.

    is there anything else i should have done?

    Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi almmlaa,

    It’s possible that the solution posted a few months ago is no longer relevant for the current code, although I’m not sure. Unfortunately we just can’t help with conflicts like this here on the free support forum. Here are some resources that might be helpful for you:

    ? Themer’s Guide
    ? Tutorials
    ? Technical Docs

    Perhaps one of the other people from this thread will be able to assist you as well. Good luck!

    ~Leah

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Google map not showing’ is closed to new replies.