Title: Exclude scripts not working
Last modified: March 29, 2020

---

# Exclude scripts not working

 *  Resolved [markkes](https://wordpress.org/support/users/markkes/)
 * (@markkes)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/)
 * Hi!
 * Ive been cracking my brain over the problem that my exclude scripts in autoptimize
   aren’t working.. Ive added jquery.js comma separated and also tested it with 
   the css part of exclusions. Now I finally stumbled on the following issue where
   people where discussing filter overrides, like autoptimize_filter_js_exclude.
   Eventually I found out a plugin i am using for popups has a filter overide. See:
 *     ```
       public function init() {
         add_filter('autoptimize_filter_js_exclude', [$this, 'excludeJavascript'], 10, 1);
         add_filter('autoptimize_filter_css_exclude', [$this, 'excludeCss'], 10, 1);
       }
       ```
   
 * The plugin is Arscode Ninja Popups, i cant get you the source code since its 
   availible on code canyon.
 * I disabled this plugin and now the exclusions are working. Any chance I can fix
   this while still using the popup plugin? Since im already using this plugin (
   absolutly not happy with the plugin sinces its crap but its some work to replace
   it).
 * Let me know.
 * Mark
    -  This topic was modified 6 years, 5 months ago by [markkes](https://wordpress.org/support/users/markkes/).
    -  This topic was modified 6 years, 5 months ago by [markkes](https://wordpress.org/support/users/markkes/).

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12596886)
 * if you’re into PHP coding, you could hook into `autoptimize_filter_js_exclude`(
   and the CSS one) yourself with a priority 11 (or higher) and try do undo their
   arscode? 😉
 *  Thread Starter [markkes](https://wordpress.org/support/users/markkes/)
 * (@markkes)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12598321)
 * Thanks for your quick response, I tried some things with the remove_filter() 
   function but cant seem to figure it out. I uncommented the code in the plugin
   too test but that doesnt seem to work either. Also send a message to the plugin
   developer but havent got a response yet.
 * Can you help me out any further or should I take this up with them?
 * Thanks!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12598480)
 * based on “I uncommented the code in the plugin too test but that doesn’t seem
   to work either” my guess is they’re taking multiple approaches to change AO’s
   behavior, quite impossible for me to help I’m afraid :-/ but given “Arscode Ninja
   Popups” is premium software, they _should_ be able and willing to help you?
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12649700)
 * No feedback any more so I assume this got resolved with help from the arscode
   team? Feel free to follow up if you still encounter issues!
 * have a nice day!
    frank
 *  Thread Starter [markkes](https://wordpress.org/support/users/markkes/)
 * (@markkes)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12656229)
 * Their looking it to the issue but havent got a sollution yet.. Dont have support
   with them either because the plugin came with a premium theme. Hopefully they
   will follow up asap.
 * Thanks for your help!
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12656689)
 * you’re welcome, feel free to [leave a review of the plugin and support here](https://wordpress.org/support/plugin/autoptimize/reviews/#new-post)!
   🙂

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

 The topic ‘Exclude scripts not working’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

 * 6 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [6 years, 5 months ago](https://wordpress.org/support/topic/exclude-scripts-not-working-3/#post-12656689)
 * Status: resolved