{"id":1234661,"date":"2017-02-14T08:46:44","date_gmt":"2017-02-14T16:46:44","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/"},"modified":"2017-02-14T08:46:44","modified_gmt":"2017-02-14T16:46:44","slug":"putting-search-bar-on-another-page-everything-works-except-geolocation","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/","title":{"rendered":"Putting search bar on another page &#8230; everything works except geolocation"},"content":{"rendered":"<p>Hi,<br \/>\nI&#8217;m trying to put the main search bar on the front page of my website and show the results in the main calendar page.<\/p>\n<p>I followed the info in this thread (https:\/\/theeventscalendar.com\/support\/forums\/topic\/whole-search-bar-on-another-page\/), and on this site (http:\/\/gregorypearcey.com\/blog\/add-tribe-events-search-bar-home-page\/) <\/p>\n<p>I was able to get nearly everything working, the keyword &amp; date return the correct results on the calendar page&#8230;only the geolocation doesn&#8217;t work. When I put in the name of a city, it shows all events on the next page instead of the ones in the city.<\/p>\n<p>The problem seems to be that the longitude &amp; latitude aren&#8217;t being sent in the url. <\/p>\n<p>Here&#8217;s what I put in functions.php:<\/p>\n<pre><code>function tribe_bar_anywhere_logic() {\n    if ( ! class_exists( &#039;Tribe__Events__Bar&#039; ) ) {\n        return false;\n    }\n    wp_enqueue_script( &#039;jquery&#039; );\n   Tribe__Events__Template_Factory::asset_package( &#039;bootstrap-datepicker&#039; );\n   Tribe__Events__Template_Factory::asset_package( &#039;ajax-calendar&#039; );\n    Tribe__Events__Template_Factory::asset_package( &#039;calendar-script&#039; );\n    Tribe__Events__Template_Factory::asset_package( &#039;jquery-resize&#039; );\n    Tribe__Events__Template_Factory::asset_package( &#039;events-css&#039; );\n    Tribe__Events__Bar::instance()-&gt;load_script();\n    ob_start();\n    tribe_get_template_part( &#039;modules\/bar2&#039; );\n    return ob_get_clean();\n}\nadd_shortcode( &#039;tribe_bar_anywhere&#039;, &#039;tribe_bar_anywhere_logic&#039; );<\/code><\/pre>\n<p>Maybe I&#8217;m not calling the right script &#8230;?<\/p>\n<p>Is anyone be able to help me solve this or point me in the right direction? <\/p>\n<p>Thanks a lot \ud83d\ude42<\/p>\n","protected":false},"template":"","class_list":["post-1234661","topic","type-topic","status-closed","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Putting search bar on another page ... everything works except geolocation -<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Putting search bar on another page ... everything works except geolocation -\" \/>\n<meta property=\"og:description\" content=\"Hi, I&#8217;m trying to put the main search bar on the front page of my website and show the results in the main calendar page. I followed the info in this thread (https:\/\/theeventscalendar.com\/support\/forums\/topic\/whole-search-bar-on-another-page\/), and on this site (http:\/\/gregorypearcey.com\/blog\/add-tribe-events-search-bar-home-page\/) I was able to get nearly everything working, the keyword &amp; date return the correct results on [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/\",\"name\":\"Putting search bar on another page ... everything works except geolocation -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2017-02-14T16:46:44+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/theeventscalendar.com\/support\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Topics\",\"item\":\"https:\/\/theeventscalendar.com\/support\/topics\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Calendar Products\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Events Calendar PRO\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Putting search bar on another page &#8230; everything works except geolocation\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\",\"url\":\"https:\/\/theeventscalendar.com\/support\/\",\"name\":\"\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Putting search bar on another page ... everything works except geolocation -","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/","og_locale":"en_US","og_type":"article","og_title":"Putting search bar on another page ... everything works except geolocation -","og_description":"Hi, I&#8217;m trying to put the main search bar on the front page of my website and show the results in the main calendar page. I followed the info in this thread (https:\/\/theeventscalendar.com\/support\/forums\/topic\/whole-search-bar-on-another-page\/), and on this site (http:\/\/gregorypearcey.com\/blog\/add-tribe-events-search-bar-home-page\/) I was able to get nearly everything working, the keyword &amp; date return the correct results on [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/","name":"Putting search bar on another page ... everything works except geolocation -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2017-02-14T16:46:44+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/putting-search-bar-on-another-page-everything-works-except-geolocation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/theeventscalendar.com\/support\/"},{"@type":"ListItem","position":2,"name":"Topics","item":"https:\/\/theeventscalendar.com\/support\/topics\/"},{"@type":"ListItem","position":3,"name":"Calendar Products","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/"},{"@type":"ListItem","position":4,"name":"Events Calendar PRO","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/events-calendar-pro\/"},{"@type":"ListItem","position":5,"name":"Putting search bar on another page &#8230; everything works except geolocation"}]},{"@type":"WebSite","@id":"https:\/\/theeventscalendar.com\/support\/#website","url":"https:\/\/theeventscalendar.com\/support\/","name":"","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/theeventscalendar.com\/support\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1234661","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1234661\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1234661"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}