Showing posts with label Disable Auto Embed Script in WordPress 4.4. Show all posts
Showing posts with label Disable Auto Embed Script in WordPress 4.4. Show all posts

Thursday, 24 December 2015

How to Disable Auto include Script in WordPress 4.4


How to Disable Auto include Script in WordPress 4.4

In WordPress 4.4 there are some scripts like jQuery, jquery-migrate.min, wp-embed which auto include in page. Here i have displayed how to remover these scripts or How to stop loading these scripts.

Put below function in functions.php

function stop_useless_script(){
if( !is_admin()){
wp_deregister_script('jquery-migrate.min');
wp_deregister_script('jquery');
wp_deregister_script('wp-embed');
}
}
add_action('init', 'stop_useless_script');