{"id":1958765,"date":"2023-12-09T11:08:04","date_gmt":"2023-12-09T16:08:04","guid":{"rendered":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/?p=1958765"},"modified":"2023-12-09T11:08:06","modified_gmt":"2023-12-09T16:08:06","slug":"always-use-the-address-in-the-get-directions-link","status":"publish","type":"post","link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/always-use-the-address-in-the-get-directions-link\/","title":{"rendered":"Always use the address in the Get Directions link"},"content":{"rendered":"\n<p>When using Events Calendar Pro and the latitude and longitude coordinates are set up for a venue, then the &#8220;Get Directions&#8221; or &#8220;+ Google Map&#8221; link for the venue will use those coordinates to pinpoint the location on the map. This is a more reliable and precise way to locate a venue.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"420\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/ecp_google_map_link-1024x420.jpg\" alt=\"\" class=\"wp-image-1958766\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/ecp_google_map_link-1024x420.jpg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/ecp_google_map_link-300x123.jpg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/ecp_google_map_link-768x315.jpg 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/ecp_google_map_link.jpg 1189w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>When clicking on that link, the visitor will be taken to the Google Maps website, which will then show the coordinates as the location, and not the name or address, which can offer a subpar user experience.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates-1024x560.jpg\" alt=\"Image of Google Maps centered on the White House with coordinates showing the location.\" class=\"wp-image-1958767\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates-1024x560.jpg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates-300x164.jpg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates-768x420.jpg 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates-1536x840.jpg 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_coordinates.jpg 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image of Google Maps centered on the White House with coordinates showing the location.<\/figcaption><\/figure>\n\n\n\n<p>Fortunately, there is an easy way to change that. All it requires is a one-line snippet, which you can add to your child-themes <em>functions.php<\/em> file, or with the help of a plugin like Code Snippets. (Check out our article about <a href=\"https:\/\/staging.theeventscalendar.com\/knowledgebase\/best-practices-for-implementing-custom-code-snippets\/\">Using Custom Code Snippets<\/a>.)<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: php; title: ; quick-code: false; notranslate\" title=\"\">\nadd_filter( &#039;tribe_events_pro_google_map_link_disable_coordinates&#039;, &#039;__return_true&#039; );\n<\/pre><\/div>\n\n\n<p>With that line in place, when you click on the &#8220;+ Google Maps&#8221; or &#8220;Get Directions&#8221; link you will be taken to Google Maps with the address instead of the coordinates as the location.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"560\" src=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address-1024x560.jpg\" alt=\"Image of Google Maps centered on the White House with the address showing the location.\" class=\"wp-image-1958768\" srcset=\"https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address-1024x560.jpg 1024w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address-300x164.jpg 300w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address-768x420.jpg 768w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address-1536x840.jpg 1536w, https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/12\/gmaps_location_with_address.jpg 1919w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">Image of Google Maps centered on the White House with the address showing the location.<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>When using Events Calendar Pro and the latitude and longitude coordinates are set up for a venue, then the &#8220;Get Directions&#8221; or &#8220;+ Google Map&#8221; link for the venue will use those coordinates to pinpoint the location on the map. This is a more reliable and precise way to locate a venue. When clicking on&#8230;<\/p>\n","protected":false},"author":17,"featured_media":1955565,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_kad_blocks_custom_css":"","_kad_blocks_head_custom_js":"","_kad_blocks_body_custom_js":"","_kad_blocks_footer_custom_js":"","_swpsp_post_exclude":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"ep_exclude_from_search":false,"footnotes":""},"categories":[24,59,79],"tags":[42,201],"stellar-product-taxonomy":[],"class_list":["post-1958765","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-customizing","category-customizing-resources","category-snippets","tag-google-maps","tag-venue"],"acf":[],"taxonomy_info":{"category":[{"value":24,"label":"Customizations"},{"value":59,"label":"PHP &amp; Functions"},{"value":79,"label":"Snippets"}],"post_tag":[{"value":42,"label":"Google Maps"},{"value":201,"label":"Venue"}]},"featured_image_src_large":["https:\/\/images.theeventscalendar.com\/kb\/uploads\/2023\/02\/social-share-1024x538.png",1024,538,true],"author_info":{"display_name":"Andras Guseo","author_link":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/author\/andras\/"},"comment_info":0,"category_info":[{"term_id":24,"name":"Customizations","slug":"customizing","term_group":0,"term_taxonomy_id":24,"taxonomy":"category","description":"","parent":0,"count":110,"filter":"raw","term_order":"0","cat_ID":24,"category_count":110,"category_description":"","cat_name":"Customizations","category_nicename":"customizing","category_parent":0},{"term_id":59,"name":"PHP &amp; Functions","slug":"customizing-resources","term_group":0,"term_taxonomy_id":59,"taxonomy":"category","description":"","parent":24,"count":101,"filter":"raw","term_order":"0","cat_ID":59,"category_count":101,"category_description":"","cat_name":"PHP &amp; Functions","category_nicename":"customizing-resources","category_parent":24},{"term_id":79,"name":"Snippets","slug":"snippets","term_group":0,"term_taxonomy_id":79,"taxonomy":"category","description":"","parent":0,"count":136,"filter":"raw","term_order":"0","cat_ID":79,"category_count":136,"category_description":"","cat_name":"Snippets","category_nicename":"snippets","category_parent":0}],"tag_info":[{"term_id":42,"name":"Google Maps","slug":"google-maps","term_group":0,"term_taxonomy_id":42,"taxonomy":"post_tag","description":"","parent":0,"count":9,"filter":"raw","term_order":"0"},{"term_id":201,"name":"Venue","slug":"venue","term_group":0,"term_taxonomy_id":201,"taxonomy":"post_tag","description":"","parent":0,"count":2,"filter":"raw","term_order":"0"}],"_links":{"self":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1958765","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/users\/17"}],"replies":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=1958765"}],"version-history":[{"count":1,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1958765\/revisions"}],"predecessor-version":[{"id":1958769,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/1958765\/revisions\/1958769"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media\/1955565"}],"wp:attachment":[{"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=1958765"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=1958765"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=1958765"},{"taxonomy":"stellar-product-taxonomy","embeddable":true,"href":"https:\/\/staging.theeventscalendar.com\/knowledgebase\/wp-json\/wp\/v2\/stellar-product-taxonomy?post=1958765"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}