Title: [Plugin: Events Calendar] Add support for wp_enqueue_scripts
Last modified: August 20, 2016

---

# [Plugin: Events Calendar] Add support for wp_enqueue_scripts

 *  [ahuggins](https://wordpress.org/support/users/ahuggins/)
 * (@ahuggins)
 * [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-events-calendar-add-support-for-wp_enqueue_scripts/)
 * I have been using this plugin for a little while, I was wondering if it would
   be possible to get a change made. I would like to add support for `wp_enqueue_scripts`
   so that those of us who know how to `wp_deregister_script` and `wp_deregister_style`
   would be able to limit the additional css and js files from loading on every 
   page of our site.
 * This would require a change to events-calendar.php, and would look something 
   like this:
 *     ```
       function EventsCalendarFrontScripts() {
       	$ec_thickbox_style_path = get_bloginfo('url').'/wp_includes/js/thickbox/thickbox.css';
       	wp_register_style('ec_thickbox', $ec_thickbox_style_path);
       	wp_enqueue_style('ec_thickbox');
       	$ec_style_path = EVENTSCALENDARCSSURL.'/events-calendar.css';
       	wp_register_style('ec_styles', $ec_style_path);
       	wp_enqueue_style('ec_styles');
   
       }
       ```
   
 * And then you would need to add the following line:
    `add_action('wp_enqueue_scripts','
   EventsCalendarFrontScripts');`
 * Doing so would allow the people that want to, prevent the css and other styles
   from loading if they do not need them. It may be useful to do something similar
   for the “no_conflict” code, since that probably doesn’t need to be loaded on 
   every page of everyone’s site. But the other two for sure.
 * If you want I can send you the files, or the code above should be enough. Oh 
   and you would be able to delete a bunch of the function EventsCalendarHeaderScript.
 * [http://wordpress.org/extend/plugins/events-calendar/](http://wordpress.org/extend/plugins/events-calendar/)

The topic ‘[Plugin: Events Calendar] Add support for wp_enqueue_scripts’ is closed
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/events-calendar.svg)
 * [Events Calendar](https://wordpress.org/plugins/events-calendar/)
 * [Support Threads](https://wordpress.org/support/plugin/events-calendar/)
 * [Active Topics](https://wordpress.org/support/plugin/events-calendar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-calendar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-calendar/reviews/)

## Tags

 * [improvement](https://wordpress.org/support/topic-tag/improvement/)
 * [wp_enqueue_scripts](https://wordpress.org/support/topic-tag/wp_enqueue_scripts/)

 * 0 replies
 * 1 participant
 * Last reply from: [ahuggins](https://wordpress.org/support/users/ahuggins/)
 * Last activity: [13 years, 11 months ago](https://wordpress.org/support/topic/plugin-events-calendar-add-support-for-wp_enqueue_scripts/)
 * Status: not resolved