Created
August 6, 2016 16:13
-
-
Save cloudwales/2baf2832067823c8f099327f0fe3200c to your computer and use it in GitHub Desktop.
WordPress jQuery Issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Custom Function to bypass Wordpress jQuery Issue | |
add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' ); | |
function theme_enqueue_styles() { | |
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' ); | |
if (!is_admin()) { | |
wp_deregister_script('jquery'); | |
wp_register_script('jquery', ("https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"), false, '1.11.3'); | |
wp_enqueue_script('jquery'); | |
} | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment