The Events Calendar
Gogole Map Placement (10 posts)

  1. dpDesignz
    Posted 3 years ago #

    Hey People

    I'm wanting to move the google map on my event pages from underneath the #tribe-events-event-meta to inside it above the google maps button. Can anyone show me what I have to change in the template to get this please? ex page http://www.hukanuiyouth.com/event/first-event/

    You can see an example of what I'm wanting here http://www.hukanuiyouth.com/build/wp-content/uploads/2012/02/demo.jpg

    Also on a side note, every time I update an event it clears the address. Does anyone else have this problem? And how would I go about fixing it?

    Thanks in advance


  2. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 3 years ago #

    Hi there Damien. On the first issue: that's a bit outside the realm of customization I'm familiar with, but have you checked this FAQ post (http://tri.be/?qa_faqs=how-can-i-place-the-map-featured-image-below-the-event-description-instead-of-above)? It's not the exact same task but it's similar and could point you in the right direction.

    On the second issue: believe you've found the other thread on that, since I saw your post there. Shoot me an email if you're interested in trying that new code.

  3. dpDesignz
    Posted 3 years ago #

    Awesome. Thanks it worked. :) http://www.hukanuiyouth.com/event/games-ffc/

    Now my only question is can you set custom zoom levels on your google map? It's always zoomed so far out.

  4. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 3 years ago #

    You totally can. At this point, the tips provided in this thread should do it: http://tri.be/support/forums/topic/zoom-level-of-google-map. In 2.1, there will be a backend setting to control this too...so you won't need to worry about modifying any files within the plugin itself.

    Hope that helps, do let us know if you need anything else.

  5. dpDesignz
    Posted 3 years ago #

    Thanks man you've been a HUGE help!

    Just one last thing in 2.1 the zoom level isn't updating.

  6. dpDesignz
    Posted 3 years ago #

    Oh dear. New Problem

    I have moved the event info details on my page but now when I don't have a map embedded it breaks my page. any ideas?

    Broken Page Preview http://www.hukanuiyouth.com/event/tramp/

    single.php source code http://pastebin.com/0HKM91yE

  7. Rob La Gatta
    Modern Tribe Support
    Plugin Author

    Posted 3 years ago #

    Hey again :) The 2.1 code is definitely still a work-in-progress, and the zoom functionality is one of those we're working on. If you want to check in a week or so out it'll probably be more stable.

    For the second problem: I'll have one of our devs take a look at this directly and see anything in your code jumps out at them as to problematic. Stay tuned on that end.

  8. jonahcoyote
    Posted 3 years ago #

    Hey Damien,

    It looks like you've got an unclosed HTML tag that's throwing everything off and I think it's related how you've placed the endif; outside of the dt tag. Try placing it within like so:

    <?php if( tribe_embed_google_map( get_the_ID() ) ) : ?>
    		<?php if( tribe_address_exists( get_the_ID() ) ) { echo tribe_get_embedded_map(); } ?>
    		<?php if( tribe_show_google_map_link( get_the_ID() ) ) : ?>
    		<a class="gmap" itemprop="maps" href="<?php echo tribe_get_map_link() ?>" title="<?php _e('Click to view a Google Map', 'tribe-events-calendar'); ?>" target="_blank"><?php _e('Google Map', 'tribe-events-calendar' ); ?></a>
    <?php endif; ?>
  9. dpDesignz
    Posted 3 years ago #

    Hey @jonahcoyote

    Sorry hadn't seen your reply. :)

    I tried as you suggested but still broken. hmm

    Updated code can be found here http://pastebin.com/0HKM91yE

  10. jonahcoyote
    Posted 3 years ago #

    Ok, let's take a step back. First either revert your single.php file back to the stock or just clean up the tribe_address_exists() conditional on line 72-82 so it looks like so: http://pastebin.com/E5duSfGF

    Next take out the whole block of code that shows the map on line 89-91: http://pastebin.com/UiE0k5Ly

    And then on line 71 right before the tribe_address_exists() conditional and after the tribe_get_phone() conditional block, let's get some spacing in there and create a new dt/dd set for the map like so: http://pastebin.com/a4AeJPHC (paste all that code in there.

    You may not want this in a dt/dd set and you may need to play around with the styling a bit but this should be along the lines of what you want to do.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • The Events Calendar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic