Forums

SimpleModal Login
[resolved] Disable Jquery loading (6 posts)

  1. excentricus
    Member
    Posted 1 year ago #

    Greetings!

    How can I disable jquery in this plugin? My theme is already calling for a instance, and now it's doing it twice. I looked at the code but can't figure it out.

    Great plugin, BTW.

    Thanks.

  2. Eric Martin
    Member
    Posted 1 year ago #

    Are you using wp_enqueue_script() to load jQuery? If not, you should be...doing so will solve your problem. wp_enqueue_script() is the correct way to load scripts and allows WordPress to manage which scripts have been loaded and prevent duplicates.

    See:
    http://www.ericmmartin.com/5-tips-for-using-jquery-with-wordpress/
    http://codex.wordpress.org/Function_Reference/wp_enqueue_script

  3. excentricus
    Member
    Posted 1 year ago #

    Actually, I prefer to load it straight from google CDN for speed and bandwidth, plus most people have this already in their browser cache.

    It would be awesome to have a option to disable it in the panel. What part of the code do I need to edit to have a fix for now?

    Thanks for the great plugin.

  4. Eric Martin
    Member
    Posted 1 year ago #

    Did you read the first article I provided?

    You can load it from Google's CDN, but you *need* to use the correct way of loading scripts in WordPress.

  5. excentricus
    Member
    Posted 1 year ago #

    Oh sorry, I feel like a fool. Thanks a lot.

  6. Eric Martin
    Member
    Posted 1 year ago #

    No problem ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic