NextGEN Gallery Optimizer Now Discontinued

Due to the major breaking changes set to be introduced with the Gutenberg editor in WordPress v5.0, NextGEN Gallery Optimizer has now been discontinued.

Valid license holders for Optimizer Pro will continue to receive support if required, but the product has now been removed from sale, in preparation for the release.

I want to say a big thank you to everyone who's enjoyed using the plugin to optimize their sites over the last six and a half years, and wish you all the best for the future.

Kind regards,
Mark.

NextGEN Gallery Optimizer Documentation

NextGEN Gallery Deactivator

What is the NextGEN Gallery Deactivator feature?

Exclusive to Optimizer Pro, the NextGEN Gallery Deactivator feature substantially improves your site's page load speed on non-gallery pages, by excluding all NextGEN code from being processed on the front-end of your site (except on pages you specify).

Have a page called "Gallery", perhaps? Simply enter it into the settings page, and it's the only place NextGEN will ever load outside the admin.

Especially effective when using NextGEN v2 (v2.0.0 to v2.1.60), Deactivator also deactivates NextGEN Legacy (v1.6.2 to v1.9.13), the NextCellent Gallery fork (v1.9.14 to v1.9.31), and will even deactivate the NextGEN Gallery Pro or Plus add-ons simultaneously (if installed alongside NextGEN v2).

Getting started with Optimizer Pro's Deactivator feature

If you haven't already, get yourself a copy of Optimizer Pro, upload it to your site at Plugins -> Add New -> Upload, and activate it on your plugins page. See the Installation Guide for more.

After activation, you'll be automatically redirected to the Optimizer Pro settings page, where you'll find an on/off checkbox for Deactivator, and fields to instruct the plugin exactly where you want NextGEN Gallery to load.

To get started with Deactivator:

1. Navigate to Settings -> NextGEN Gallery Optimizer Pro.
2. Switch on Deactivator's checkbox.
3. Enter the slug of an Allowed Page.
4. Click Save Options.

Further details:

Once you click Deactivator's on/off checkbox on Optimizer's settings page, a form field will slide down for you to enter an Allowed Page, which is essentially a front-end page you require gallery functionality on.

As an example, if you have a Gallery page at http://www.yoursite.com/gallery, you would enter the page slug of gallery.

If you have another page you want NextGEN to load on, simply click the Add another Allowed Page button, and an extra form field will slide down for you to fill in.

When you're finished adding Allowed Pages, simply click Save Options and you're all set. The pages you've entered will be the only places NextGEN will ever load outside the admin.

Technical Note:

Optimizer's settings page fully validates the "Allowed Pages" input fields on save, and requires that at least one page is added (which will typically be your "Gallery" page).

Can I still add/edit my galleries while Deactivator is activated?

Absolutely! Deactivator only deactivates NextGEN on the public-facing, front-end pages of your site. It's what your visitors and customers see and experience, and we want to put on a good show, right?

Inside your admin however, all of NextGEN's gallery creation and editing functionality works as normal, so you can add/edit/delete galleries, slideshows and albums to your heart's content...even via NextGEN 2.0's Attach to Post interface.

Note: If you do add new gallery pages, remember to visit Optimizer's settings page and add their slugs to Deactivator's Allowed Pages list.

Why is NextGEN still activated on the Plugins page when using Optimizer's NextGEN Deactivator feature?

That's because the Plugins page is inside the admin.

As discussed above, Deactivator only deactivates NextGEN on the public-facing, front-end pages of your site (except for pages you specify). This provides a faster browsing experience for your visitors and customers, while you maintain full administrative control of your galleries in the back-end.

How can I test if Deactivator is deactivating NextGEN?

Apart from feeling greater responsiveness from your site when browsing front-end, non-gallery pages, the most unequivocal way to test if NextGEN's code is being included, evaluated or in any way executed, is to output something from NextGEN's main plugin file.

For example, if you open up "wp-content/plugins/nextgen-gallery/nggallery.php" and add print_r( $ngg ); to the very bottom of the file, every page that NextGEN's running on will have the nggLoader() object printed at the top before any HTML. Pages without this output are not processing any NextGEN code, as Deactivator has blocked the inclusion of its files (including the main plugin file we just edited).

Please remember to revert your changes after testing to restore normal operation.

Can I use NextGEN widgets with Optimizer's NextGEN Deactivator?

Absolutely! You just need to tell Deactivator which of your front-end pages require NextGEN functionality.

Let's say you're conditionally loading a gallery widget (or perhaps a third-party slider) on your homepage only. All you need to do is select the "is_home" option in Deactivator's Allowed Pages list, and NextGEN will be allowed to load on your homepage, but not the rest of your site.

Can I use Deactivator if I'm using NextGEN 2.0's "What must the lightbox be applied to?" option?

Yes, you can! But you'll need to make sure you tell Deactivator about every page you require NextGEN functionality on.

For example, if you've selected "Only apply to NextGEN and WordPress images" at Gallery --> Other Options --> Lightbox Effects --> "What must the lightbox be applied to?", you'll need to load NextGEN on all pages with WordPress images, in addition to pages with NextGEN images for your selected lightbox to function on both types.