Nivo Slider for WordPress
Stop Loading jQuery Incorrectly (12 posts)

  1. dcblog
    Posted 5 years ago #

    Nivo slider is incorrectly loading jQuery from its own source


    Please correct this ASAP and use the correct enqueue_scripts method to load jQuery


  2. pyryk
    Posted 4 years ago #

    +1 for this.

    I modified the plugin to do js loading correcly. Here is the patch/diff file for my modifications: http://dl.dropbox.com/u/328788/nivoslider4wp_enqueue_scripts.patch. Works for me, but it might not conform to other wp standards or be otherwise imperfect as I'm not an experienced wp developer. Feel free to send suggestions or improve it.

    For the original developer, could you apply the patch to the plugin code so that this issue gets fixed?

  3. tafkanator
    Posted 4 years ago #

    I changed code too. Please update it in next version or it will break other stuff again after update

  4. leefitzgerald91
    Posted 4 years ago #

    What are you suppose to do with the Patch?
    i am having the same jquery problems.

  5. andycheeseman
    Posted 4 years ago #


    How would I manually change this code? I'm experiencing the same problems as the others in this thread.


  6. pyryk
    Posted 4 years ago #

    I noticed that in my patchfile there were my wordpress installation specific paths that may have made the script not work. I changed the paths to not include the wordpress root folder.

    If you're running Unix, you could apply the patch by downloading the (updated) patch file to your wordpress root folder and running the patch file with
    patch -p0 < nivoslider4wp_enqueue_scripts.patch
    There should be a Windows port of patch also (google patch windows), but I think it might be easier to apply changes by hand (see next section).

    The patch file is a regular diff file (http://en.wikipedia.org/wiki/Diff#Unified_format). In this case:
    1) create a file wp-content/plugins/nivo-slider-for-wordpress/js/nivoSlider4wp.js (defined by line 5 in patchfile) and paste the 3 lines starting with '+' there. Remove the leading plus signs.
    2) Find the file wp-content/plugins/nivo-slider-for-wordpress/nivoslider4wp-show.php (defined by line 14 in patchfile) and go to line 29 (defined by patchfile line 15). There should be a script element.
    3) Remove the line and the following line (they are marked with "-" in the patch file), and paste the lines marked with "+" in the patch file (again, remove the leading plus signs)
    4) repeat steps 2 and 3 for the remaining -/+ lines

    Alternatively, you can download complete files here:
    http://dl.dropbox.com/u/328788/nivoSlider4wp.js, save to wp-content/plugins/nivo-slider-for-wordpress/js/
    http://dl.dropbox.com/u/328788/nivoslider4wp-show.php, save to wp-content/plugins/nivo-slider-for-wordpress/ (overwrites a previous file)

    Hope this helps.


  7. andycheeseman
    Posted 4 years ago #

    Cheers Pyry. A great explanation (and the ready coded fix to boot!)


  8. olalindberg
    Posted 4 years ago #

    Thanks a lot for the help! Solved my issues as well. Great done!

    I sent marcelotorres (http://profiles.wordpress.org/users/marcelotorres/) an e-mail about this issue a month ago but I haven't heard anything from him. Hopefully it'll be fixed so we don't mess it up in the next update.

    Again. Thakns!

  9. daledude
    Posted 4 years ago #

    +1 also. I don't know why people bundle jQuery with their plugin when jQuery comes with WordPress. Makes no sense and causes too many headaches especially when I have to go in and delete the line every update.

  10. Heritz
    Posted 4 years ago #

    Pain in the nuts. To fix it, open the nivoslider4wp-show.php file on your favorite text editor and completely remove the jquery call line, which looks something like this:

    <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.5.1/jquery.min.js"></script>

    Save the file and reupload it via FTP. You can also edit this file from the plugin editor on WordPress. (Plugins -> Nivo -> edit).

  11. sanderbaks
    Posted 4 years ago #

    Hi Heritz,

    It worked, thanks !! Im happy again!

  12. mische7
    Posted 4 years ago #

    Hey everyone. I'm using Elegant Themes 'Boutique' as well as WP E-Commerce to set up a store. I'm frustrated with the slider that's part of the theme and was thinking of going with the Nivo Slider. Based on your experiences, would you still choose it if you had it to do again? I'm not sure when the latest update was or if they've fixed the jquery conflict but it looks like you've all figured out the work-around.

    I'd love to hear what you think. (the other slider I'm considering is the Wow Slider, though I haven't researched that one much yet.)


Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic