• Resolved web-girl

    (@web-girl)


    I am hoping to get some help with a Kwicks menu issue. I am helping with a website that is on WordPress 3.2.1. When I update it to 3.8.1., the Kwicks menu breaks. I haven’t updated any plugins, and the theme is exactly the same as in 3.2.1. However, now the menu does not expand and contract.

    The theme is using Jquery 1.4.2 – which is also old, but when I upgrade, it doesn’t fix the issue.

    Here’s the code form the Kwicks menu:

    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.easing.1.3.js"></script>
    <script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.kwicks-1.5.1.pack.js"></script>
    <script type="text/javascript">
    /*<![CDATA[*/
    $(document).ready(function() {
                        $('.kwicks').kwicks({
    					max : 600,
                        min : 300,
    					spacing : 0,
                        duration: 200
      				});
    });
    /*]]>*/
    </script>
    <div id="slidewrap">
    	<ul class="kwicks horizontal" >
    <?php
        $slidecat = get_option('swt_slide_category');
    	$slidecount = get_option('swt_slide_count');
     	$my_query = new WP_Query('category_name= '. $slidecat .'&showposts='.$slidecount.'');
        while ($my_query->have_posts()) : $my_query->the_post();$do_not_duplicate = $post->ID; $x++;
    ?>
    			<li id="kwick_<?php echo $x; ?>">
    			   <?php echo $i; ?>
                   <span class="fadeout"></span>
                                  <span class="fadeout"><p><?php if (function_exists('smart_excerpt')) smart_excerpt(get_the_excerpt(), 60); ?></p></span>
    
                    <?php $screen = get_post_meta($post->ID,'slide', true); ?>
                  <div class="excerpt">
                        <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
                    </div>
                  <img src="<?php echo ($screen); ?>" alt="<?php the_title(); ?>" width="650" height="280" />
                </li>
              <?php endwhile; ?>
    		</ul>
    </div>
Viewing 5 replies - 1 through 5 (of 5 total)
  • Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    Let’s see the page with the issue

    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    It may just be better to contact your theme’s vendors about this directly

    Thread Starter web-girl

    (@web-girl)

    Unfortunately, I’m looking at this on my local machine (haven’t updated the live site yet). It is a custom theme with no support.

    I can’t figure out what in the WordPress core would have impacted the jQuery on the site.

    I also noticed that when I look at the actual loaded site on the homepage, the code looks exactly the same, except 3.8.1 has additional JQuery links before the closing body tag:

    <script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js?ver=1.7.1'></script>
    <script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/scriptaculous.js?ver=1.9.0'></script>
    <script type='text/javascript' src='//ajax.googleapis.com/ajax/libs/scriptaculous/1.9.0/effects.js?ver=1.9.0'></script>
    <script type='text/javascript' src='https://localhost:8888/testing/wp-content/plugins/lightbox-2/lightbox.js?ver=1.8'></script>
    Andrew Nevins

    (@anevins)

    WCLDN 2018 Contributor | Volunteer support

    As you’re using a custom theme and we can’t see a link to the page, there’s not really much we can recommend other than encouraging you to debug this through some nice tools:
    https://developers.google.com/chrome-developer-tools/docs/console
    https://developers.google.com/chrome-developer-tools/docs/javascript-debugging

    There’s a slight inkling in the code you posted that something may be wrong with the version of jQuery you’re using. WordPress by default forces you to use jQuery in “no-conflict” mode.
    No-Conflict mode would result in something like this:

    jQuery(document).ready(function($) {
                        $('.kwicks').kwicks({
    					max : 600,
                        min : 300,
    					spacing : 0,
                        duration: 200
      				});
    });

    But you’re using jQuery like this:

    $(document).ready(function() {
                        $('.kwicks').kwicks({
    					max : 600,
                        min : 300,
    					spacing : 0,
                        duration: 200
      				});
    });

    Thread Starter web-girl

    (@web-girl)

    Thank you so much! That fixed the issue. Who knew it was something at simple as that. I guess the code worked in older version of WordPress (3.2.1), but not in 3.8.1.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Kwicks Menu Broken after WordPress Core Update’ is closed to new replies.