WordPress 4.5 update broke my website

This title sounds so much familiar, right. Thankfully it didn’t happen to my sites as most of my plugins and my theme code is updated and then of my clients as well but in last 2 days I have got around 10-12 requests for fixing sites where plugin/theme broke, it is most likely happening due to latest WordPress updating jQuery to the very latest version, at-least that;s what I have seen in the sites I fixed in last 30 hours, so just to help out if you can edit code and have a child theme installed, go to your functions.php file and add the below code, please do make a backup and also there could be possibility that your site might have broken due to some other reason, check your developer console to see if there is a JS error.

function modify_jquery() {
if (!is_admin()) {
wp_deregister_script('jquery');
wp_register_script('jquery', 'https://code.jquery.com/jquery-1.11.3.min.js');
wp_enqueue_script('jquery');
}
}
add_action('init', 'modify_jquery');

And if you still want me to do it, send me an email and I will reply back.

%d bloggers like this: