Title: Automptimze Javascript breaking Theme Foundry Menus
Last modified: October 6, 2018

---

# Automptimze Javascript breaking Theme Foundry Menus

 *  Resolved [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/)
 * Hey Frank,
 * Hope all is well.
 * I’ve seen recently an issue on some of my sites where when activated, the Javascript
   minification is breaaking the Make Theme from The Theme Foundry’s drop down menus,
   which just simply won’t drop down.
 * I did install the ASYNC plugin to see if that would help, but it does not. I 
   just left it on the basic settings.
 * This is the second site I’m having an issue with. The first, 67biltmore.com, 
   I’ve turned off Autoptimize for now until I can figure out a solution.
 * Please be reminded, I’m not a developer – I’m a product owner, so I’m not specifically
   knowledgeable about some of these things and need a little hand holding to get
   past it.
 * Now that it’s happened on two different sites, but not others, I just don’t know
   what it could be. Because when I disable Javascript, it works. When I re-enable,
   it doesn’t. I haven’t changed any settings. Only the first box is checked.
 * Thanks,
 * Tony
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fautomptimze-javascript-breaking-theme-foundry-menus%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10755069)
 * morning Tony;
    can you try adding `/themes/make/js` to the comma-separated JS
   optimization exclusion list?
 * frank
 *  Thread Starter [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10756728)
 * Thanks, Frank.
 * I tried that and dumped caches at WP Engine and Cloudflare, as well as the Autoptimize
   cache. I also tried catch wrapping with the /theme/make/js to the comma separated
   exclusion list, but it’s still stuck with no drop down capability.
 * Here’s a screenshot of the settings for JS: [https://cloudup.com/co1AJeWLp5x](https://cloudup.com/co1AJeWLp5x)
 * I unticked cache wrapping, because it didn’t change anything. I also tried to
   force js in the head, but that didn’t work either and I tried to force javascript
   in the head with cache wrapping ticked, but that didn’t do anything either.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10756765)
 * I *think* the problem now is due to the use of async’ing, can you disable async
   JS for a second to confirm?
 *  Thread Starter [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10758447)
 * Hmmm…nope, that didn’t do it. I disabled the ASYNC plugin completely.
 * I also tried catch wrapping on/off again.
 * I cleared the Autoptimize cache, the cloudflare cache, my browser cache, and 
   the WP Engine cache and it’s still not displaying the dropdown with JS minification
   enabled.
 *  Thread Starter [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10758518)
 * Frank,
 * I did add the comma separated `/themes/make/js` to [https://67biltmore.com/](https://67biltmore.com/)
   and after a refresh and clearing the cache, it does seem to work on that site
   for now. But, I didn’t take the new Autoptimze update on that site yet, either.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10759850)
 * OK, got it 🙂
 * The issue is not with JS optimization, not with CSS optimization (as such), but
   with the critical CSS you’re using (and it’s broken on both your sites).
 * The critical CSS contains this (edited somewhat for brevity);
 *     ```
       @media screen and (min-width:800px) {
        .site-navigation .menu .sub-menu {
         display:none;
         overflow:hidden;
         position:absolute;
         z-index:99999;
        }
       }
       ```
   
 * it’s the `display:none;` that is breaking the menu dropdowns.
 * One solution could be to add this to the normal CSS (e.g. in appearance -> customize-
   > additional CSS);
 *     ```
       @media screen and (min-width:800px) {
        .site-navigation .menu .sub-menu {
           display:unset;
         }
       }
       ```
   
 * Maybe test if after that you can remove `/themes/make/js` from the JS exclusions?
 * hope this helps,
    frank
 *  Thread Starter [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10760184)
 * Ah! Good catch. Thanks so much.
 * I’ll try that then and see what happens.
 * Will report back shortly.
 *  Thread Starter [Tony Zeoli](https://wordpress.org/support/users/tonyzeoli/)
 * (@tonyzeoli)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10760996)
 * Yep, that worked on both sites.
 * I’ve updated Theme Foundry, so they are aware of the issue.
 * Thanks for your help. As always, you’re a committed and serious WordPress professional
   and I do appreciate everything you’d done to help me and my clients optimize 
   page speed for better SEO.
 * I have about 5 sites now that are all ranking page 1 for various keywords and
   one of the reasons is your plugin. Without it some dropped a little, so having
   this piece of the puzzle solved is very valuable.
 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10761132)
 * Happy to hear to Tony, have a nice day! 🙂

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

The topic ‘Automptimze Javascript breaking Theme Foundry Menus’ 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/)

## Tags

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

 * 9 replies
 * 2 participants
 * Last reply from: [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * Last activity: [7 years, 8 months ago](https://wordpress.org/support/topic/automptimze-javascript-breaking-theme-foundry-menus/#post-10761132)
 * Status: resolved