Title: control the enqueued javascript files
Last modified: August 21, 2016

---

# control the enqueued javascript files

 *  Resolved [Mohammad Sabbagh](https://wordpress.org/support/users/sabbagh/)
 * (@sabbagh)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/)
 * Hi Marcus,
 * any updates about this
 * how we can control the en-queued javascript files
 * for example if i am using only the events calender i dont think i need 13 Javascript
   files
 * i only need the main events-manager.js file
 * which is not possible unless i edit the main plugin
 * `wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.
   js',__FILE__), array_values($script_deps));`
 * to
 * `wp_enqueue_script('events-manager', plugins_url('includes/js/events-manager.
   js',__FILE__), array_values($script_deps));`
 * i try to dequeue the extra files in function.php
 * but that didnt work because dequeueing any one will remove all jquery-ui file
   including events-manager.js
 * and then its not possible to enqueue anyone again
 * any help is so appreciated
 * Many Thanks,
 * [http://wordpress.org/extend/plugins/events-manager/](http://wordpress.org/extend/plugins/events-manager/)

Viewing 6 replies - 1 through 6 (of 6 total)

 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680423)
 * try Events > Settings > General > Performance Optimization
 *  Thread Starter [Mohammad Sabbagh](https://wordpress.org/support/users/sabbagh/)
 * (@sabbagh)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680441)
 * Thanks agelonwl for reply
 * on Events > Settings > General > Performance Optimization
    i changed “Limit JS
   file loading?” to yes
 * the result is
 * in the home page it loads events-manager.js which is fine because i use calender
 * all other pages _which doesn’t include anything related to events manager plugin_,
   they load 6 js files
 * events-manager.js
    jquery.ui.autocomplete.min.js jquery.ui.core.min.js jquery.
   ui.menu.min.js jquery.ui.position.min.js jquery.ui.widget.min.js
 * i have checked [Optimization recommendation](http://wp-events-plugin.com/documentation/optimization-recommendations/)
   but it didnt explain enough
 * i am wonder if there is someway to stop loading extra js files for all pages
 * any idea why the usual wp_dequeue_script , wp_deregister_script functions dont
   solve this problem
 * Many Thanks
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680443)
 * are you sure other plugins aren’t adding these too?
 * if yes, what about leaving everyghing but ‘General JS’ field blank in those settings?
 *  Plugin Author [Marcus (aka @msykes)](https://wordpress.org/support/users/netweblogic/)
 * (@netweblogic)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680444)
 * or alternatively, make event General JS blank.
 *  Thread Starter [Mohammad Sabbagh](https://wordpress.org/support/users/sabbagh/)
 * (@sabbagh)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680447)
 * Hi Marcus
 * it was other plugins which loading the extra js files
 * the result is when i keep ‘General JS’ blank it wont load anything
 * when its 0 it will load only events-manager.js
 * Thank you very much and sorry that i didn’t check other plugins
 *  [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * (@angelonwl)
 * [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680475)
 * no problem, thanks for updating us.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘control the enqueued javascript files’ is closed to new replies.

 * ![](https://ps.w.org/events-manager/assets/icon-256x256.png?rev=3550347)
 * [Events Manager - Calendar, Bookings, Tickets, and more!](https://wordpress.org/plugins/events-manager/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/events-manager/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/events-manager/)
 * [Active Topics](https://wordpress.org/support/plugin/events-manager/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/events-manager/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/events-manager/reviews/)

## Tags

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

 * 6 replies
 * 3 participants
 * Last reply from: [agelonwl](https://wordpress.org/support/users/angelonwl/)
 * Last activity: [13 years, 1 month ago](https://wordpress.org/support/topic/control-the-enqueued-javascript-files/#post-3680475)
 * Status: resolved