{"id":1454197,"date":"2018-02-15T07:35:36","date_gmt":"2018-02-15T15:35:36","guid":{"rendered":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/"},"modified":"2018-02-15T07:35:36","modified_gmt":"2018-02-15T15:35:36","slug":"dequeueing-events-calendar-pro-scripts","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/","title":{"rendered":"Dequeueing Events Calendar Pro scripts"},"content":{"rendered":"<p>Hi there,<br \/>\nI&#8217;ve seen this question asked on the forums, but I&#8217;m having some trouble on my site. I&#8217;m trying to dequeue the following scripts (basically, I&#8217;m showing only a simple list on this page and I&#8217;d like to strip out the extraneous scripts from loading)<\/p>\n<p>https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; \/src\/resources\/js\/tribe-events-photo-view.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; dar-pro\/src\/resources\/js\/tribe-events-pro.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; pro\/vendor\/imagesloaded\/imagesloaded.pkgd.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/events-calendar-pro\/vendor\/isotope\/isotope.pkgd.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/the-events-calendar\/src\/resources\/js\/tribe-events.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/the-ev &#8230; tstrap-datepicker\/js\/bootstrap-datepicker.min.js<br \/>\nhttps:\/\/beta.mbts.edu\/wp-content\/plugins\/the-ev &#8230; dar\/vendor\/jquery-resize\/jquery.ba-resize.min.js<\/p>\n<p>I&#8217;ve tried the following code in functions.php, based on what I was able to pick up here on the forums:<\/p>\n<p><code>function dequeue_events_calendar_scripts() {<br \/>\n    wp_dequeue_script(\u2018tribe-events-jquery-resize\u2019);<br \/>\n    wp_dequeue_script(\u2018jquery-placeholder\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-bootstrap-datepicker\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-bar\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-calendar-script\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-list\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-pro-geoloc\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events-pro\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-events\u2019);<br \/>\n    wp_dequeue_script(\u2018tribe-isotope\u2019);<br \/>\n}<br \/>\nadd_action('wp_enqueue_scripts', 'dequeue_events_calendar_scripts', 100);<\/code><\/p>\n<p>For some reason, this isn&#8217;t working (well, I know the isotope handle is probably not correct, that was just a guess). I also had this wrapped in a <code>if ( is_front_page() ) { }<\/code> tag at first, but I thought the conditional might be screwing things up. That shouldn&#8217;t be the case though, right? Ideally, I&#8217;d like to be able to conditionally dequeue these scripts on different pages depending on what my needs are. Is this possible?<\/p>\n<p>Andrew<\/p>\n","protected":false},"template":"","class_list":["post-1454197","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>Dequeueing Events Calendar Pro scripts -<\/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\/dequeueing-events-calendar-pro-scripts\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Dequeueing Events Calendar Pro scripts -\" \/>\n<meta property=\"og:description\" content=\"Hi there, I&#8217;ve seen this question asked on the forums, but I&#8217;m having some trouble on my site. I&#8217;m trying to dequeue the following scripts (basically, I&#8217;m showing only a simple list on this page and I&#8217;d like to strip out the extraneous scripts from loading) https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; \/src\/resources\/js\/tribe-events-photo-view.min.js https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; dar-pro\/src\/resources\/js\/tribe-events-pro.min.js https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; pro\/vendor\/imagesloaded\/imagesloaded.pkgd.min.js [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/\" \/>\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\/dequeueing-events-calendar-pro-scripts\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/\",\"name\":\"Dequeueing Events Calendar Pro scripts -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2018-02-15T15:35:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/#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\":\"Dequeueing Events Calendar Pro scripts\"}]},{\"@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":"Dequeueing Events Calendar Pro scripts -","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\/dequeueing-events-calendar-pro-scripts\/","og_locale":"en_US","og_type":"article","og_title":"Dequeueing Events Calendar Pro scripts -","og_description":"Hi there, I&#8217;ve seen this question asked on the forums, but I&#8217;m having some trouble on my site. I&#8217;m trying to dequeue the following scripts (basically, I&#8217;m showing only a simple list on this page and I&#8217;d like to strip out the extraneous scripts from loading) https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; \/src\/resources\/js\/tribe-events-photo-view.min.js https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; dar-pro\/src\/resources\/js\/tribe-events-pro.min.js https:\/\/beta.mbts.edu\/wp-content\/plugins\/events &#8230; pro\/vendor\/imagesloaded\/imagesloaded.pkgd.min.js [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/","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\/dequeueing-events-calendar-pro-scripts\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/","name":"Dequeueing Events Calendar Pro scripts -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2018-02-15T15:35:36+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/dequeueing-events-calendar-pro-scripts\/#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":"Dequeueing Events Calendar Pro scripts"}]},{"@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\/1454197","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\/1454197\/revisions"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=1454197"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}