Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Abhis,

    Do you perhaps have a link to your site?

    The plugin will try to load the JavaScript files in the footer of your theme, provided that your theme has the required call to the wp_footer() function.

    Thread Starter abhis2.0

    (@abhis20)

    Hello Danny,

    Thanks for the prompt reply.

    I have figured out why JS won’t load but now I am facing a completely different problem.

    The reason why JS was not loading because I have de-registered jquery in themes functions. And looks like plugin files are dependent on registered jquery. So I registered jquery in functions but sideloaded it through CDN.

    Now the problem is that the plugin is loading additional CSS file which I want to have control on. For performance reasons, I want to serve only single CSS file – combining theme CSS and plugin CSS.

    Can I ask plugin not to load the CSS file?

    You can see the plugin added in one of the latest post here.

    Plugin Author Danny van Kooten

    (@dvankooten)

    Hi Abhis,

    Yes, definitely. The CSS file that is loaded by the plugin is loaded using default WordPress enqueue functions. You can simply dequeue the plugin stylesheet and make sure you have your own styles set-up.

    However, a simpler way might be to use a “combine & minification” plugin which does all this for you. Such a plugin will automatically go through all WordPress registered scripts and combine them into a single file for you. That’s what such a system is for. 🙂

    This one is pretty awesome like that: https://github.com/kasparsd/minit/ .
    Alternative: https://wordpress.org/plugins/bwp-minify/ .

    Hope that helps. If not, let me know!

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

The topic ‘JS files won't load’ is closed to new replies.