• Resolved yhdm

    (@yellowhousedesign)


    Hi all,
    I am currently using:

    if( !is_admin()){
    	   wp_deregister_script('jquery');
    	}

    in my functions.php file to deregister the WordPress core jQuery for my own, newer version. It seems when I do this though, it also takes out the necessary wp_footer scripts that Contact Form 7 uses to run the AJAX functionality. Does anyone have a suggestion on a workaround for this? The contact form is in a text-widget that is on all pages, so I cannot call it differently on a single page or anything. Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • When are you registering your version of jQuery? Are you registering it as ‘jquery’? If you change it and/or don’t register it across the board, you are going to mess up other plugins that rely on jQuery.

    https://vudu.me/8i

    This shows how to register google’s most recent jquery, but the concept is the same…. have you properly registered the jquery as @tim says?

    Thread Starter yhdm

    (@yellowhousedesign)

    Wow, that was quick ??

    Currently, after I am deregistering jQuery from the theme, I am calling it manually in my header.php file as such:

    <script src="//ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script>
    	<script>window.jQuery || document.write("<script src='<?php echo get_template_directory_uri(); ?>/js/libs/jquery-1.6.1.min.js'>\x3C/script>")</script>

    So basically, the same way https://rootstheme.com and https://html5boilerplate.com do it. Thanks!

    rather than just calling it in to the head via text/link

    I would register/enqueue it, hopefully my link is helpful for explaining that

    Thread Starter yhdm

    (@yellowhousedesign)

    Yes, had to move a few things around, but it looks like that should work. Thanks!

    Excellent! Glad you got it sorted!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘wp_deregister_script('jquery'); making core Contact Form 7 scripts not load’ is closed to new replies.