Home › Forums › Calendar Products › Events Calendar PRO › Dequeue/unhook CSS
- This topic has 9 replies, 3 voices, and was last updated 5 years, 10 months ago by Richard Bleakley.
-
AuthorPosts
-
January 26, 2017 at 12:32 pm #1224613Richard BleakleyParticipant
Hi, I’m just getting started with this plugin and it looks very good, however it calls 8 separate stylesheets which seems really inefficient.
I want to override them anyway, what’s the best method to unhook or dequeue them? I tried the following but it doesn’t work for me…
add_action( 'wp_enqueue_scripts', 'bootstrap_theme_enqueue_scripts', 1 ); function dequeue_tribe_events_styles() { wp_dequeue_style( 'tribe_events-calendar-style' ); } add_action('wp_enqueue_scripts', 'dequeue_tribe_events_styles', 100 );
January 26, 2017 at 3:46 pm #1224791CliffMemberHi, Richard.
I’d suggest first changing your settings at wp-admin > Events > Settings > Display tab and using Skeleton Styles.
After you do that, please let me know if this answers your question. If not, please specify which stylesheets and/or scripts you’re still wanting removed.
January 27, 2017 at 1:19 am #1224968Richard BleakleyParticipantThanks – I tried that but it still calls in all the stylesheets. This site is huge so I need maximum efficiency!
January 27, 2017 at 1:21 am #1224969Richard BleakleyParticipantI want to remove all the stylesheets so they aren’t enqueued by the plugin, I’ll copy them in to my own concatenated one.
January 27, 2017 at 2:22 pm #1225439CliffMemberCould you please provide a link?
You site shouldn’t be loading all the same stylesheets between the Skeleton, Full, and Tribe style types.
Also, our files are loaded minified so they should be okay if you are going to use the styles anyway.
January 31, 2017 at 1:21 am #1226686Richard BleakleyParticipantHi – they aren’t minified! The default skin is good, just not very efficient so I’d like to remove them and pull them in to my main compiled version.
The skeleton styles are OK but still pulling in three separate stylesheets. Here’s a link to the staging site:
Thanks in advance!
January 31, 2017 at 7:39 pm #1227283CliffMemberI found these in the page source of your home page:
<link rel=’stylesheet’ id=’tribe_events-widget-calendar-pro-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/widget-calendar-skeleton.css?ver=4.4.1′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe_events–widget-calendar-pro-override-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/widget-calendar-skeleton.css?ver=4.4.1′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe-events-calendar-pro-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/tribe-events-pro-skeleton.min.css?ver=4.4.1′ type=’text/css’ media=’all’ />
And these at http://blackdogvps.com/bhs/events/:
<link rel=’stylesheet’ id=’tribe_events-widget-calendar-pro-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/widget-calendar-skeleton.css?ver=4.4.1′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe_events–widget-calendar-pro-override-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/widget-calendar-skeleton.css?ver=4.4.1′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe-events-bootstrap-datepicker-css-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/vendor/bootstrap-datepicker/css/datepicker.css?ver=4.7.2′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe-events-custom-jquery-styles-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/vendor/jquery/smoothness/jquery-ui-1.8.23.custom.css?ver=4.7.2′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe-events-calendar-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/src/resources/css/tribe-events-skeleton.min.css?ver=4.4.1.1′ type=’text/css’ media=’all’ />
<link rel=’stylesheet’ id=’tribe-events-calendar-pro-style-css’ href=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/tribe-events-pro-skeleton.min.css?ver=4.4.1′ type=’text/css’ media=’all’ />
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/vendor/bootstrap-datepicker/js/bootstrap-datepicker.min.js?ver=3.2′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/vendor/jquery-placeholder/jquery.placeholder.min.js?ver=2.0.7′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/vendor/jquery-resize/jquery.ba-resize.min.js?ver=1.1′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/src/resources/js/tribe-events.min.js?ver=4.4.1.1′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/js/tribe-events-pro.min.js?ver=4.4.1′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/src/resources/js/tribe-events-bar.min.js?ver=4.4.1.1′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/js/tribe-events-ajax-maps.min.js?ver=4.4.1′></script>
<script type=’text/javascript’ src=’http://blackdogvps.com/bhs/wp-content/plugins/the-events-calendar/src/resources/js/tribe-events-ajax-calendar.min.js?ver=4.4.1.1′></script>
===
1)
So are you happy with the files that are loaded as long as they are minified?
If yes, these are the non-minified files that are at your site:
- widget-calendar-skeleton.css
- datepicker.css
- jquery-ui-1.8.23.custom.css
If yes, I can dig into why these 3 are not minified; let me know.
2)
I noticed http://blackdogvps.com/bhs/wp-content/plugins/events-calendar-pro/src/resources/css/widget-calendar-skeleton.css?ver=4.4.1 is twice in the page source, once with ID tribe_events-widget-calendar-pro-style-css and once with ID tribe_events–widget-calendar-pro-override-style-css
I filed this bug report; it happens for all 3 style options (Skeleton, Full, Tribe).
February 1, 2017 at 7:05 am #1227475Richard BleakleyParticipantPersonally I would prefer an option to disable all styles completely so I can use my own single stylesheet. That would be the simplest solution. I have a concatenated js file as well, so the option to disable js and pull that in to the a single call would also be appreciated.
I’m sure other theme developers would appreciate those options as well. Thanks for looking in to it!
February 1, 2017 at 2:53 pm #1227831CliffMemberI have this old snippet that may come in handy here:
https://gist.github.com/cliffordp/d3e17609114d84eb6a36
If you cannot figure it out or want a second set of eyes to take a closer look once you’ve got it setup, please let me know and I’ll help more where I can.
Please let me know how this goes for you.
May 29, 2018 at 3:26 pm #1541331VictorKeymasterHi Richard!
Just wanted to share with you that a new release of our plugins is out, including a fix for this issue 🙂
Find out more about this release → https://theeventscalendar.com/maintenance-release-for-the-week-of-27-may-2018/
We apologize for the long delay and appreciate your patience while we worked on this.
Please update the plugins and let us know if the fix works for your site.
Best,
VictorJune 20, 2018 at 9:35 am #1557278Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Dequeue/unhook CSS’ is closed to new replies.