Problem loading jQuery hosted library
-
Good Afternoon,
I have recently modified my entire theme by creating a child theme. I uploaded it and so far everything was working. My custom script were executing and the hosted jQuery library was loading.
However, I recently checked the check box enqueue safe version of jQuery in the itheme security pluging and ever since everything went wrong. So I decided to re-upload my back up files via an FTP client. Unfortunately it is not working.
The hosted version of jQuery is not loading. Instead of having “https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js” loading I have “https://www.thesofachronicle.com/wp-includes/js/jquery/jquery.js?616696” and “https://www.thesofachronicle.com/wp-includes/js/jquery/jquery-migrate.min.js?616696” loading. I am stuck and I cannot find any answer.
PS: I also reuploaded a backup version of my htaccess file.
Here is my code that I use in the function.php file of my child theme.
<?php function my_init_method() { wp_deregister_script( 'jquery' ); wp_register_script( 'jquery', 'ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js'); } add_action('init', 'my_init_method'); ?>
- The topic ‘Problem loading jQuery hosted library’ is closed to new replies.