{"id":1199484,"date":"2016-11-29T16:13:02","date_gmt":"2016-11-30T00:13:02","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/"},"modified":"2016-11-29T16:13:02","modified_gmt":"2016-11-30T00:13:02","slug":"recreate-event-search-bar-in-page-template","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/","title":{"rendered":"Recreate Event Search bar in page template"},"content":{"rendered":"<p>Hi,<\/p>\n<p>I have used the code from bar.php to use in a theme file.<\/p>\n<p>You can see it on this page http:\/\/g1.carlyblack.net (dot) au\/<\/p>\n<p>I can&#8217;t get the datepicker to function correctly however.<\/p>\n<p>Compare it to http:\/\/g1.carlyblack.net (dot) au\/events\/ to see what I mean.<\/p>\n<p>These are the JS and CSS I am using. All are pulled through to the page successfully.<\/p>\n<p>\t\/\/Add the stylesheet into the header<br \/>\n\twp_enqueue_style(&#8220;tribe.homepage&#8221;,WP_PLUGIN_URL.&#8221;\/the-events-calendar\/src\/resources\/css\/tribe-events-full.css&#8221;);<\/p>\n<p>\twp_enqueue_style(&#8220;tribe.homepage.filter&#8221;,WP_PLUGIN_URL.&#8221;\/the-events-calendar-filterbar\/src\/resources\/css\/filter-view.css&#8221;);<\/p>\n<p>\twp_enqueue_style(&#8220;tribe.homepage.date&#8221;,WP_PLUGIN_URL.&#8221;\/tribe-homepage-search\/css\/datepicker.css&#8221;);<\/p>\n<p>\t\/\/Add the scripts in the footer<br \/>\n\twp_enqueue_script(&#8220;jquery&#8221;);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.bar&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar\/src\/resources\/js\/tribe-events-bar.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.events&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar\/src\/resources\/js\/tribe-events.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.datepicker&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar\/vendor\/bootstrap-datepicker\/js\/bootstrap-datepicker.min.js&#8221;,<br \/>\narray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.footer&#8221;, WP_PLUGIN_URL.&#8221;\/tribe-homepage-search\/js\/footer.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>    }<\/p>\n<p>Am I missing a JS or CSS file that is needed to make this work?<\/p>\n<p>Thanks<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.bar&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar\/src\/resources\/js\/tribe-events-bar.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.events&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar\/src\/resources\/js\/tribe-events.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\t\/\/wp_enqueue_script(<br \/>\n\t\/\/&#8221;tribe.filter.events&#8221;, WP_PLUGIN_URL.&#8221;\/the-events-calendar-filterbar\/src\/resources\/js\/filter-scripts.js&#8221;,<br \/>\n\t\/\/array(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.datepicker&#8221;, WP_PLUGIN_URL.&#8221;\/tribe-homepage-search\/js\/bootstrap-datepicker.min.js&#8221;,<br \/>\narray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>\twp_enqueue_script(<br \/>\n\t&#8220;tribe.homepage.footer&#8221;, WP_PLUGIN_URL.&#8221;\/tribe-homepage-search\/js\/footer.js&#8221;,<br \/>\n\tarray(&#8220;jquery&#8221;), &#8220;1.3.1&#8221;,1);<\/p>\n<p>    }<\/p>\n","protected":false},"template":"","class_list":["post-1199484","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>Recreate Event Search bar in page template -<\/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\/recreate-event-search-bar-in-page-template\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Recreate Event Search bar in page template -\" \/>\n<meta property=\"og:description\" content=\"Hi, I have used the code from bar.php to use in a theme file. You can see it on this page http:\/\/g1.carlyblack.net (dot) au\/ I can&#8217;t get the datepicker to function correctly however. Compare it to http:\/\/g1.carlyblack.net (dot) au\/events\/ to see what I mean. These are the JS and CSS I am using. All are [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/\" \/>\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\/recreate-event-search-bar-in-page-template\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/\",\"name\":\"Recreate Event Search bar in page template -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-11-30T00:13:02+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/#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\":\"Recreate Event Search bar in page template\"}]},{\"@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":"Recreate Event Search bar in page template -","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\/recreate-event-search-bar-in-page-template\/","og_locale":"en_US","og_type":"article","og_title":"Recreate Event Search bar in page template -","og_description":"Hi, I have used the code from bar.php to use in a theme file. You can see it on this page http:\/\/g1.carlyblack.net (dot) au\/ I can&#8217;t get the datepicker to function correctly however. Compare it to http:\/\/g1.carlyblack.net (dot) au\/events\/ to see what I mean. These are the JS and CSS I am using. All are [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/","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\/recreate-event-search-bar-in-page-template\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/","name":"Recreate Event Search bar in page template -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-11-30T00:13:02+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/recreate-event-search-bar-in-page-template\/#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":"Recreate Event Search bar in page template"}]},{"@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\/1199484","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\/1199484\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1199484"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}