{"id":887856,"date":"2014-11-17T08:39:21","date_gmt":"2014-11-17T16:39:21","guid":{"rendered":"http:\/\/tri.be\/support\/forums\/topic\/cannot-dequeue-styles\/"},"modified":"2015-07-07T06:31:12","modified_gmt":"2015-07-07T13:31:12","slug":"cannot-dequeue-styles","status":"closed","type":"topic","link":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/","title":{"rendered":"Cannot dequeue styles"},"content":{"rendered":"<p>I&#8217;m using the latest Events Calendar and Events Calendar Pro plugins (3.8.1) on a WordPress 4.0 install. Currently there are stylesheets that load on every page, I&#8217;d like to remove them for non-events-related pages. I have attempted everything I&#8217;ve found posted in these forums, such as:<\/p>\n<p>function enqueue_scripts_styles() {<br \/>\n  \/\/ Load main stylesheet<br \/>\n  wp_enqueue_style( &#8216;main-stylesheet&#8217;, get_stylesheet_uri() );<\/p>\n<p>  \/\/ Dequeue events calendar stylesheets<br \/>\n  wp_dequeue_style( &#8216;tribe-events-full-pro-calendar&#8217; );<br \/>\n  wp_dequeue_style( &#8216;tribe-events-calendar-pro&#8217; );<br \/>\n  wp_dequeue_style( &#8216;tribe-events-calendar-full-pro-mobile&#8217; );<br \/>\n  wp_dequeue_style( &#8216;tribe-events-calendar-pro-mobile&#8217; );<br \/>\n}<br \/>\nadd_action( &#8216;wp_enqueue_scripts&#8217;, &#8216;enqueue&#8217; );<\/p>\n<p>The above does not work to remove these styles (I&#8217;ll add logic later to target what pages I want to remove them on). I&#8217;ve tried just about every permutation imaginable, has the method to remove these stylesheets changed or could I be provided with an example of how best to accomplish this?<\/p>\n<p>Thank you!<\/p>\n","protected":false},"template":"","class_list":["post-887856","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>Cannot dequeue styles -<\/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\/cannot-dequeue-styles\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Cannot dequeue styles -\" \/>\n<meta property=\"og:description\" content=\"I&#8217;m using the latest Events Calendar and Events Calendar Pro plugins (3.8.1) on a WordPress 4.0 install. Currently there are stylesheets that load on every page, I&#8217;d like to remove them for non-events-related pages. I have attempted everything I&#8217;ve found posted in these forums, such as: function enqueue_scripts_styles() { \/\/ Load main stylesheet wp_enqueue_style( &#8216;main-stylesheet&#8217;, [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/\" \/>\n<meta property=\"article:modified_time\" content=\"2015-07-07T13:31:12+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\/cannot-dequeue-styles\/\",\"url\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/\",\"name\":\"Cannot dequeue styles -\",\"isPartOf\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/#website\"},\"datePublished\":\"2014-11-17T16:39:21+00:00\",\"dateModified\":\"2015-07-07T13:31:12+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/#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\":\"Cannot dequeue styles\"}]},{\"@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":"Cannot dequeue styles -","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\/cannot-dequeue-styles\/","og_locale":"en_US","og_type":"article","og_title":"Cannot dequeue styles -","og_description":"I&#8217;m using the latest Events Calendar and Events Calendar Pro plugins (3.8.1) on a WordPress 4.0 install. Currently there are stylesheets that load on every page, I&#8217;d like to remove them for non-events-related pages. I have attempted everything I&#8217;ve found posted in these forums, such as: function enqueue_scripts_styles() { \/\/ Load main stylesheet wp_enqueue_style( &#8216;main-stylesheet&#8217;, [&hellip;]","og_url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/","article_modified_time":"2015-07-07T13:31:12+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\/cannot-dequeue-styles\/","url":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/","name":"Cannot dequeue styles -","isPartOf":{"@id":"https:\/\/theeventscalendar.com\/support\/#website"},"datePublished":"2014-11-17T16:39:21+00:00","dateModified":"2015-07-07T13:31:12+00:00","breadcrumb":{"@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/theeventscalendar.com\/support\/forums\/topic\/cannot-dequeue-styles\/#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":"Cannot dequeue styles"}]},{"@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\/887856","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\/887856\/revisions"}],"predecessor-version":[{"id":983593,"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/topic\/887856\/revisions\/983593"}],"wp:attachment":[{"href":"https:\/\/theeventscalendar.com\/support\/wp-json\/wp\/v2\/media?parent=887856"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}