I make websites.

Welcome to Alastair Mucklow's website. Browse my portfolio of web design and development projects - then hire me!

WordPress + Next Gen gallery – remove default scripts

Next Gen gallery is probably the most full-featured, customisable WordPress gallery plugin out there.

I’d been using it for a year or so before I read Dave Rupert’s post on optimising WordPress for speed. Looking at the source, I realised that Next Gen was loading additional jQuery script files even if they weren’t required for the gallery theme.

The solution is to block this in the wp-config.php file like so:

/* Prevent load of NGG JS */
define('NGG_SKIP_LOAD_SCRIPTS', TRUE);
/* That's all, stop editing! Happy blogging. */

3 Responses to WordPress + Next Gen gallery – remove default scripts

  1. Sollly says:

    Just what I was after. Thank you :)

  2. Sven says:

    Thank you! That was deadly simple.

  3. Sebastian says:

    Great!
    I was always annoyed by that and couldn’t figure out how to prevent it.
    Now the ‘head’ is much cleaner.
    :)
    Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">