Did you know: this website doesn't support this OLD Browser. Please Update it or

You should try out most popular browsers in the world Firefox or Google Chrome.

Nivoslider and WordPress problem fixed

You are here: Home » Tutorials » Wordpress » Nivoslider and WordPress problem fixed
2       comments {by: } Posted in: Wordpress

Recently I have upgraded my WordPress to version 3.2.1 (latest) and suddenly my nivoslider halted on the first slide and also It was taking a lot of time to load. I browsed and searched for the answer but there was not a satisfactory one. So here is the fix !
Actually I think the problem was with WordPress 3.2.1 default Jquery and nivoslider compatibility. So I downgraded my Jquery to version 1.4 and it is working like a charm.
Paste the following code in your wordpress functions.php file:

function my_init_method() {
if (!is_admin()) {
wp_deregister_script( 'jquery' );
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js');
wp_enqueue_script( 'jquery' );
}
}

And also on some blog I got a little tweak that remove spaces or linkbreaks between nivoslider images div in html code like shown below.


<div id="slider" class="nivoSlider">
               <a href="http://www.coffeedesign.net"><img src="<?php bloginfo('template_directory'); ?>/imagefolder/image1.jpg" alt=""  /></a><a href="http://www.coffeedesign.net"><img src="<?php bloginfo('template_directory'); ?>/imagefolder/image2.jpg" alt=""  /></a><img src="<?php bloginfo('template_directory'); ?>/imagefolder/image3.jpg" alt=""  <img src="<?php bloginfo('template_directory'); ?>/imagefolder/image4.jpg" alt=""  />
            </div>
Page 1 of 11

2 Responses to “Nivoslider and WordPress problem fixed”

  1. 1
    Kavish says:

    Thanks, I was searching for this!

Leave a Reply