Support » Plugin: NextCellent Gallery - NextGEN Legacy » How to remove the JS and CSS includes?

  • Hi,

    I don’t need the lines that NCG adds to my pages header and am just wondering how do I stop these three from showing?

    <link rel='stylesheet' id='NextGEN-css'  href='' type='text/css' media='screen' />
    <script type='text/javascript' src=''></script>
    <script type='text/javascript' src=''></script>

Viewing 3 replies - 1 through 3 (of 3 total)
    • To disable the style, go to Galleries->Style, and unselect the ‘Activate and use style sheet’ option.
    • Add this code to your functions.php file (from your theme) to disable the scripts:
      define('NGG_SKIP_LOAD_SCRIPTS', true);

    Do note that this will prevent NextCellent from working correctly. If you just want to disable the loading on pages where NextCellent isn’t used (and still load it when it’s used), please look for a plugin, as this isn’t supported at the moment.

    Excellent, thanks Nik.

    I only use basic image attachments and featured images/thumbnails on articles anyway, so removing the JS/CSS for NCG makes no difference to me.

    Plugin Author WPReady


    Although Niko’s solution will work,maybe it is bit extreme. There is a way to selectively disable the scripts and styles:

    add_action( ‘wp_print_scripts’, ‘de_script’, 100 );

    function de_script() {
    wp_dequeue_script ( ‘jquery-cycle’ );
    wp_deregister_script( ‘jquery-cycle’ );
    wp_dequeue_script ( ‘ngg-slideshow’ );
    wp_deregister_script( ‘ngg-slideshow’ );

    add_action (‘wp_head’,’de_style’,1);

    function de_style() {

    The second action was attached to wp_head but maybe there is a better hook. This was tested on dev environment.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove the JS and CSS includes?’ is closed to new replies.