{"id":1049883,"date":"2016-01-04T08:44:08","date_gmt":"2016-01-04T16:44:08","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/"},"modified":"2016-02-18T08:34:11","modified_gmt":"2016-02-18T16:34:11","slug":"add-all-css-and-js-files-of-the-events-calendar-on-specific-page","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/","title":{"rendered":"Add all .css and .js files of the events calendar on specific page"},"content":{"rendered":"<p>Hi The Events Calendar &#8211; Team,<\/p>\n<p>I use your plugin for showing events on the \/events slug. Thats working perfect. But I also added a page where I am showing past events, which is also working fine. I need to add the basic filter bar with search and date, thats working not so well \ud83d\ude00<\/p>\n<p>I get the filters to work, but the problem is that it is not working very well because of my custom query I am missing all The Event Calendar .css and .js &#8211; files. <\/p>\n<p>So I need to add them &#8211; whats the best way to do it on a custom page? The best would be just to load it only on the corresponding page, but it would also work to load it everywhere. <\/p>\n<p>This is what I added as a shortcode in my function.php:<\/p>\n<pre><code>function tribe_event_query($atts){\r\nglobal $post;\r\n$actualDate = date('Y-m-d');\r\n$events = tribe_get_events(array(\r\n    'eventDisplay' =&gt; 'custom',\r\n    'start_date'   =&gt; '2014-01-01',\r\n    'end_date'     =&gt; '$actualDate',\r\n    'orderby'=&gt;'EventStartDate',\r\n    'order' =&gt; \u2018ASC\u2019,\r\n)); \r\n\r\necho '&lt;div class=\"wrapper\"&gt; &lt;div id=\"tribe-events-bar\"&gt; &lt;form id=\"tribe-bar-form\" class=\"tribe-clearfix tribe-bar-full\" name=\"tribe-bar-form\" method=\"post\" action=\"http:\/\/rel3756.porgy.at\/de\/der-club\/programm-archiv\"&gt; &lt;div class=\"tribe-bar-filters\"&gt; &lt;div class=\"tribe-bar-filters-inner tribe-clearfix\"&gt; &lt;div class=\"tribe-bar-date-filter\"&gt; &lt;div id=\"tribe-bar-dates\"&gt; &lt;label class=\"label-tribe-bar-date\" for=\"tribe-bar-date\"&gt;Veranstaltungen in&lt;\/label&gt; &lt;input type=\"text\" name=\"tribe-bar-date\" style=\"position: relative;\" id=\"tribe-bar-date\" value=\"\" placeholder=\"Datum\"&gt; &lt;\/div&gt;&lt;input type=\"hidden\" name=\"tribe-bar-date-day\" id=\"tribe-bar-date-day\" class=\"tribe-no-param\" value=\"\"&gt; &lt;\/div&gt;&lt;div class=\"tribe-bar-search-filter\"&gt; &lt;label class=\"label-tribe-bar-search\" for=\"tribe-bar-search\"&gt;Suchen&lt;\/label&gt; &lt;input type=\"text\" name=\"tribe-bar-search\" id=\"tribe-bar-search\" value=\"\" placeholder=\"Suchen\"&gt; &lt;\/div&gt;&lt;div class=\"tribe-bar-submit\"&gt; &lt;input class=\"tribe-events-button tribe-no-param\" type=\"submit\" name=\"submit-bar\" value=\"Suchen\"&gt; &lt;\/div&gt;&lt;\/div&gt;&lt;\/div&gt;&lt;\/form&gt; &lt;\/div&gt;&lt;h3&gt;Bereits stattgefundene Programme: &lt;\/h3&lt;&lt;ul class=\"ecs-event-list\"&gt;';\r\n\r\nforeach ($events as $event) {\r\n    echo '&lt;li class=\"ecs-event\"&gt;&lt;h4&gt;&lt;a&gt;guid . '&gt;' . $event-&gt;post_title . '<\/a><\/h4>';\r\n    $date = new DateTime($event-&gt;EventStartDate);\r\n    echo $date-&gt;format('d.m.Y, H:i') . '&lt;\/li&gt;';\r\n}\r\necho '&lt;\/ul&gt;&lt;\/div&gt;';\r\n}\r\nadd_shortcode( 'tribe-event-outdated', 'tribe_event_query' );\r\n<\/code><\/pre>\n<p>Please help!<br \/>\nThanks in advance, Lisa<\/p>\n","protected":false},"template":"","class_list":["post-1049883","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>Add all .css and .js files of the events calendar on specific page -<\/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\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Add all .css and .js files of the events calendar on specific page -\" \/>\n<meta property=\"og:description\" content=\"Hi The Events Calendar &#8211; Team, I use your plugin for showing events on the \/events slug. Thats working perfect. But I also added a page where I am showing past events, which is also working fine. I need to add the basic filter bar with search and date, thats working not so well \ud83d\ude00 [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/\" \/>\n<meta property=\"article:modified_time\" content=\"2016-02-18T16:34:11+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=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/\",\"name\":\"Add all .css and .js files of the events calendar on specific page -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2016-01-04T16:44:08+00:00\",\"dateModified\":\"2016-02-18T16:34:11+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/#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\":\"Filter Bar\",\"item\":\"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Add all .css and .js files of the events calendar on specific page\"}]},{\"@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":"Add all .css and .js files of the events calendar on specific page -","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\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/","og_locale":"en_US","og_type":"article","og_title":"Add all .css and .js files of the events calendar on specific page -","og_description":"Hi The Events Calendar &#8211; Team, I use your plugin for showing events on the \/events slug. Thats working perfect. But I also added a page where I am showing past events, which is also working fine. I need to add the basic filter bar with search and date, thats working not so well \ud83d\ude00 [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/","article_modified_time":"2016-02-18T16:34:11+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/","name":"Add all .css and .js files of the events calendar on specific page -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2016-01-04T16:44:08+00:00","dateModified":"2016-02-18T16:34:11+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/add-all-css-and-js-files-of-the-events-calendar-on-specific-page\/#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":"Filter Bar","item":"https:\/\/theeventscalendar.com\/support\/forums\/forum\/events\/filter-bar\/"},{"@type":"ListItem","position":5,"name":"Add all .css and .js files of the events calendar on specific page"}]},{"@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\/1049883","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":3,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1049883\/revisions"}],"predecessor-version":[{"id":1050794,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/1049883\/revisions\/1050794"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1049883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}