This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

This plugin has been closed and is no longer available for download.

NextGEN Query


NextGEN Query is a companion plugin for NextGEN Gallery. We created it so developers could utilize NGG’s awesome back-end interface while removing all front-end traces of the plugin.

Upon activation of NGQ you’ll notice that there’s an ‘Query’ menu item under the main NGG menu. From here you can check a setting which sterilizes your front-end of NGG’s additions.

Try using NGQ’s two functions; ngq_siglepic($image_id) and ngq_gallery($gallery_id). Build front-end elements the way you want to … without the fuss.


Upload the nextgen-query directory to the /wp-content/plugins/ directory

Activate the plugin through the ‘Plugins’ menu in WordPress

Notice the new Query menu item under the NGG menu


How can I use this plugin to remove scripts and styles that NextGEN Gallery adds to the header?

Install the plugin, activate it. Go to Gallery > Query then check the Sterilze Header box. Click Save.

What does the ngq_query() function do?

Nothing. ngq_query() is deprecated as of 2.0.0 and returns false.

What does the ngq_query_singlepic() function do?

Nothing. ngq_query_singlepic() is deprecated as of 2.0.0 and returns false.

How can I control what users see the NextGEN Query options page?

Set any capability for who can see the options page, just apply a filter to tag ‘ngqOptionsPageCapability’.

Contributors & Developers

“NextGEN Query” is open source software. The following people have contributed to this plugin.


Translate “NextGEN Query” into your language.

Interested in development?

Browse the code, check out the SVN repository, or subscribe to the development log by RSS.



  • Sterilze header works up to NGG 2.0.40


  • A much needed update to match NGG 2.0.x, a lot has changed
  • Sterilze header works again
  • Deprecated old functions as they are not consistent
  • Added ngq_singlepic(), ngq_gallery() functions


  • Plugin now gracefully disables itself if NGG is not installed and active
  • Improved documentation
  • Cleaned up and organized code
  • Options page now appears only if user has ‘manage_options’ capability
  • Change which users see options page using ‘ngqOptionsPageCapability’ filter


  • Added ngq_query_singlepic($image_id) function
  • Tested up to WordPress 3.5.1


  • Fixed a bug that broke a bunch of back-end functions. Yikes.


  • Added a bunch more info to the array returned by ngq_query()


  • Renamed public function once more to prevent function conflicts
  • Function can now accept Gallery ID or Gallery Slug
  • Fixed bug which prevented the shutter and thickbox sheets from being removed from the header


  • Updated options page and documentation
  • Updated interface placement
  • Renamed main public function


  • Initial release