Home › Forums › Calendar Products › Community Events › Google map toggle on community events submission?
- This topic has 8 replies, 3 voices, and was last updated 6 years, 10 months ago by Cliff.
-
AuthorPosts
-
June 9, 2017 at 3:06 am #1295667Abigail MarshallParticipant
I don’t see the Google Maps embed toggle on the Community events submission form any more.
Is this function still available for community submissions?
If so, how to I add it back in?
I tried adding this code to the venue.php file (taken from the template file for a previous version):
<?php
if ( ! tribe_community_events_is_venue_edit_screen() ) {
?>
<tr id="google_map_link_toggle">
<td>
<label for="EventShowMapLink">
<?php esc_html_e( 'Show Google Maps Link', 'tribe-events-community' ); ?>:
</label>
</td>
<td>
<input type="checkbox" id="EventShowMapLink" name="EventShowMapLink" value="1" <?php checked( $venue_show_map_link ); ?> />
</td>
</tr><!-- #google_map_link_toggle -->But it completely broke the events submission page, so obviously something there is not compatible.
June 12, 2017 at 9:10 pm #1296992CliffMemberHi, Abigail.
We’re planning to release this as part of our Extension Library in the next week or two.
I’ll update this post once it’s available.
Thanks for your patience.
June 12, 2017 at 9:18 pm #1296997Abigail MarshallParticipantThank you. I have request as long as your developers are working on it–
I would like to be able to set the toggle to default for the google map embed to “on” — and for the google map link “off” — and ideally the ability to make the fields hidden on the community form – so submissions automatically invoke the embedded map, without the user having to click anything.
In other words, I want every event page on my site to have an embedded map, without needing to rely on user interaction.
I’d expect others might have different preferences — but the ability to set which options are available and to set a default will be helpful in the extension.
June 12, 2017 at 9:33 pm #1297003CliffMemberThe extension is already overdue based on when we wanted it released so I’m not sure if they’ll be able to implement this, but I’ve passed along your request 🙂
June 16, 2017 at 6:50 pm #1299429CliffMemberActually, I thought about this more… you can use this snippet:
https://gist.github.com/cliffordp/d420a5f952ef3b91e6db2b4104b6f28b
And then just not have these checkboxes on the Community Events form (since they’re always going to be overridden with TRUE).
Please let me know how this goes for you.
June 16, 2017 at 7:58 pm #1299446Abigail MarshallParticipantWould this just go in my child theme’s function.php file?
June 16, 2017 at 11:40 pm #1299520Abigail MarshallParticipantOK, got it now — I wanted to have the Google embed map shown on all pages, but NOT the separate link to the Google map, so I entered this in my functions.php file:
// Event Pages always show Google map but not link, regardless of individual Event or Venue settings add_filter( 'tribe_embed_google_map', '__return_true' ); add_filter( 'tribe_show_google_map_link', '__return_false' );
It seems to be working — my site didn’t break (always a good sign when messing with functions.php); and as I browse through the various pages all look like I want them to look — so thank you!
June 19, 2017 at 2:53 pm #1300198CliffMemberAwesome! 🙂
Thanks for reporting back.
-
AuthorPosts
- The topic ‘Google map toggle on community events submission?’ is closed to new replies.