{"id":997128,"date":"2015-08-18T20:19:44","date_gmt":"2015-08-19T03:19:44","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/"},"modified":"2015-09-03T07:05:05","modified_gmt":"2015-09-03T14:05:05","slug":"maps-view-only-dipaly-event-contents-once-a-search-is-activated","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/","title":{"rendered":"Maps view only dipaly event contents once a search is activated"},"content":{"rendered":"<p>Maps view<\/p>\n<p>The default view is to show all events on the map when no geo search has been activated.  What I would like is to only list event contents once a geo search has been activated.  <\/p>\n<p>I have accomplished this to some degree by editing the map.php file in my child theme<\/p>\n<pre><code>&lt;!-- Main Events Content --&gt;\n&lt;?php if (isset($_GET[&#039;tribe-bar-geoloc&#039;]) || isset($_POST[&#039;tribe-bar-geoloc&#039;])) { ?&gt;\n&lt;?php tribe_get_template_part( &#039;pro\/map\/content&#039; ) ?&gt;\n&lt;?php } ?&gt;<\/code><\/pre>\n<p>This is not working reliably and I believe it is due to an ajax call to retrieve the search results rather than a page refresh.  When you first load the map view no found events are displayed.  Then when you perform a search the map finds the events, but the content results are not rendered.  On the results page with all the url parameters you can do a page refresh and then you see the desired results.<\/p>\n<p>How can I make my events dispaly conditionally based on a search or no search reliable.<\/p>\n<p>Below is the URL for my test site.  NOTE: the listing of &#8220;All Upcoming Events&#8221; is not what I am talking about.  That section has been created to always display after the search results.  This the reason I wish to hide the results when there has bee no search action.<\/p>\n<p>Thanks in advance!<\/p>\n<p>http:\/\/pringletech.net\/ameriestate\/events\/<\/p>\n","protected":false},"template":"","class_list":["post-997128","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>Maps view only dipaly event contents once a search is activated -<\/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\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Maps view only dipaly event contents once a search is activated -\" \/>\n<meta property=\"og:description\" content=\"Maps view The default view is to show all events on the map when no geo search has been activated. What I would like is to only list event contents once a geo search has been activated. I have accomplished this to some degree by editing the map.php file in my child theme &lt;!-- Main [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-09-03T14:05:05+00:00\" \/>\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\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/\",\"name\":\"Maps view only dipaly event contents once a search is activated -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2015-08-19T03:19:44+00:00\",\"dateModified\":\"2015-09-03T14:05:05+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/#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\":\"Maps view only dipaly event contents once a search is activated\"}]},{\"@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":"Maps view only dipaly event contents once a search is activated -","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\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/","og_locale":"en_US","og_type":"article","og_title":"Maps view only dipaly event contents once a search is activated -","og_description":"Maps view The default view is to show all events on the map when no geo search has been activated. What I would like is to only list event contents once a geo search has been activated. I have accomplished this to some degree by editing the map.php file in my child theme &lt;!-- Main [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/","article_modified_time":"2015-09-03T14:05:05+00:00","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\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/","name":"Maps view only dipaly event contents once a search is activated -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2015-08-19T03:19:44+00:00","dateModified":"2015-09-03T14:05:05+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/maps-view-only-dipaly-event-contents-once-a-search-is-activated\/#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":"Maps view only dipaly event contents once a search is activated"}]},{"@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\/997128","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":1,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/997128\/revisions"}],"predecessor-version":[{"id":997297,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/997128\/revisions\/997297"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=997128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}