Disable all scripts and styles from NextGEN Gallery?

I use nextgen gallery in a multisite. How can I disable all scripts and styles?
These thing are loaded in the code of my site:

<link rel='stylesheet' id='NextGEN-css'  href='http://mysite.com/wp-content/plugins/nextgen-gallery/css/nggallery.css?ver=1.0.0' type='text/css' media='screen' />

<script type='text/javascript' src='http://mysite.com/wp-content/plugins/nextgen-gallery/js/jquery.cycle.all.min.js?ver=2.9995'></script>

<script type='text/javascript' src='http://mysite.com/wp-content/plugins/nextgen-gallery/js/ngg.slideshow.min.js?ver=1.06'></script>

<!-- <meta name="NextGEN" version="1.9.7" /> -->

Related posts

Leave a Reply

3 comments

  1. This takes care of NextGEN’s slideshow and CSS, as well as the Shutter script and CSS that it also enqueues by default.

    add_action('wp_print_scripts', 'wpse_82982_removeScripts');
    add_action('wp_print_styles', 'wpse_82982_removeStyles');
    
    function wpse_82982_removeScripts() {
        wp_dequeue_script('ngg-slideshow');
        wp_dequeue_script('shutter');
    }
    
    function wpse_82982_removeStyles() {
        wp_dequeue_style('NextGEN');
        wp_dequeue_style('shutter');
    }
    

    But: are you sure you want to do that? Maybe you can be a little selective, and only do that on selected pages / posts / categories.

    Edit: to remove the commented-out meta tag too, add this filter:

    add_filter('show_nextgen_version', '__return_null');
    
  2. In new version of nextGen if you want clean album css you just need

    add_action('wp_print_styles', 'wpse_82982_removeStyles');
    
    function wpse_82982_removeStyles() {
        wp_dequeue_style('nextgen_basic_album_style');
    }