De-register De-queue WordPress Loaded Scripts & Styles

You can de-register and de-queue WordPress loaded javascripts and CSS styles by passing them into the wp_print_scripts function. This can help with fewer server requests if the scripts are no longer required or if a conflict is occurring.

So for example if I wanted to remove the WordPress TwentyTwelve default mobile menu javascript you would use:

//Remove twentywelve Mobile Javascript
function de_script() {
    wp_dequeue_script( 'twentytwelve-navigation' );
    wp_deregister_script( 'twentytwelve-navigation' );
}

add_action( 'wp_print_scripts', 'de_script', 100 );

You just need to know what name of the script was used to de-register and de-queue it.

https://wpbeaches.com/de-register-de-queue-wordpress-loaded-scripts-styles/
«
»
ACF (3)
Admin Column (4)
Amps (9)
Breadcrumbs (2)
CSS (6)
Custom post types (4)
Custom Taxonomies (3)
Customizer (4)
Furniture (3)
Hooks & Filters (3)
Jquery (9)
LAMP (10)
Login (5)
Meta boxes (6)
Multisite (2)
My Code (1)
Open Graph Meta Tags (1)
Pedals (9)
Redirects (2)
SEO (4)
Theme Building (5)
Title Tags (2)
Tuners (3)
Turntables (2)
Typography (3)
Uncategorised (57)
User Roles & Capabilities (2)
White labeling (9)
Working with Images (11)
Working with videos (2)
WP Database (1)