This WordPress plugin NGG Smart Image Search provides a smart search and display functionality for images in NextGEN galleries on a WordPress front end website. It requires NextGEN Gallery to be installed and activated. 

—> Plugin Directory

Further documentation and examples are given on the following pages qualified search examples, display search result list and new functionalities.


NGG Smart Image Search will provide a highly customizable search and display functionality for images in NextGEN Galleries. Search results can be displayed in various layouts including all original NextGEN galleries.

An image search will be carried out across title, description, filename and tags (as configured per widget or shortcode) of all images in arbitary selectable NextGEN search galleries. There are two search modes available. The basic search mode will look for images which satisfy at least one of the search terms (logical or). The extended search mode will look for images which satisfy all search terms (logical and).

The search result list can be displayed in various ways.

  • you can use any of the native NextGEN Galleries to display the search result list.
  • you can also use any of the NextGEN Pro / Plus Galleries with all their features including ecommerce.
  • you can use any available NextGEN Gallery settings.
  • you can use single image lists providing additional image meta data.
  • you can use an advanced thumbnail list which is independant of NextGEN Gallery code.
  • you can sort the search result list in various ways.
  • you can use paging for long search result lists.

You can enter search strings via widgets or shortcodes. You can use complex predefined searches to display an almost arbitrary collection of NextGEN Gallery images. You can dynamically switch the search mode or the display mode between searches. Searches can be configured differently for public users or for logged in (private) users.

For an extended documentation see qualified search examples or display search result list.

The new version 3 of the plugin is a major update of version 2 with many new functionalities and some optimization and error corrections.
The new functionalities are described here: new functionalities.


  1. Upload ‚NGG Smart Image Search‘ to the ‚/wp-content/plugins/‘ directory
  2. Activate the plugin through the ‚Plugins‘ menu in WordPress
  3. Adjust settings, widget and shortcode as necessary

Frequently Asked Questions

How does the search work ?

There are three possibilities to perform a search for NextGEN Galleries images:

  1. Use a dynamic search field in a sidebar widget.
    The plugin comes with a widget „NGG Smart Image Search“. If you use this widget, it will provide a search field in the sidebar. Entering text in the search field will send the input to an automatically generated search page. This search page is described on the settings page of the plugin. You can freely customize this search page.
    The search page will use a shortcode to generate and display the result list.
  2. Use a dynamic search field provided by the shortcode

    This shortcode searchbox can be placed on any post or page (also on the automatically generated search page). Entering text in this searchfield will send the input to the shortcode , which normally is placed on the same page. Otherwise you have to address the result page by a shortcode parameter (‚target‘). The shortcode will generate and display the search result.
  3. Use a predefined static search input as parameters with the shortcode
    In this case the shortcode will only display the static search result and will ignore all dynamic search inputs.

How can a search be customized ?

You can freely specify the scope of the image search by listing or excluding arbitary collections of galleries and/or albums.
You can also specify the listed meta fields per image in a single/linked search result list.

You can do this separately for public users and for logged in users.

If you do it by using search widgets, you define separate widgets for public users and for logged in users. Users will only see one widget which is relevant for them.

If you use a searchfield shortcode

you specify your customization by parameters (see screenshots for a complete list of parameters).
By default parameters are initiated differently for public users and for logged in users (see screenshots).
You can overwrite these settings by specifying the parameters in the searchbox shortcode.
E.g. parameter list_descr=“1″ will list the image description in the result list for all users.
If you want to set this parameter only for public users, you use prefix „pu_“, i.e. pu_list_title=“1″.
If you want to set this parameter only for logged in users, you use the prefix „lo_“, i.e. lo_list_descr=“1″.

How can the result list be customized ?

The result list is generated by the shortcode . This shortcode accepts a display parameter to select the result list layout.
There are several options available:

  1. use any of the NextGEN Galleries
    The easiest way to set up a NextGEN Gallery display is to define the display with an arbitrary NextGEN Gallery on a post or page. Then switch to text mode and replace the generated ’ngg‘ shortcode name by ‚hr_SIS_display_images‘. This shortcode is provided by the plugin NGG Smart Image Search. This shortcode will generate the search result list. It will then dynamically call the NextGEN Gallery shortcode and passing the needed parameters.
    You can use a short form of display codes:
        display=’bt‘ (for a Basic Thumbnail gallery)
        display=’pt‘ (for a Pro Thumbnail Gallery)
        display=’ma‘ (for a Pro Masonry Gallery)
        display=’mo‘ (for a Pro Mosaic Gallery)
  2. display=“si“ or display=“ngg_single_images“
    This will generate a detailed result list in table format showing found images and their describing fields.
    The images are displayed using the native NextGEN Gallery shortcode for displaying single images.
    Clicking on an image will open the image in the lightbox as defined on the NextGEN Gallery setting page. The lightbox will only display a single image, no skipping to next found image.
  3. display=“li“ or display=“linked_images“
    This will generate the same result list as in option (1).
    However, the found images are here displayed using explicite image links generated by this search plugin.
    For this option you should configure NextGEN Gallery so that the standard NextGEN Gallery lightbox will also work for all other linked images.
    Doing this you can again open each listed image in the standard NextGEN Gallery lightbox.
    However, now you can skip all images in the lightbox, you do no longer have to click on each image first.
  4. display=“at“ or display=“advanced_thumbnails“
    This will generate a proportional thumbnails grid for all found images.
    Furthermore, the image title is listed for each thumbnail.
    The result list consists of linked images. As for display type (2), you should configure NextGEN Gallery so that the standard NextGEN Gallery lightbox will also work for all other linked images.

In addition you can set further parameters to define the search result list layout. You can specify a sort order, a paging option, a limit parameter etc..

What search string can be entered ?

You can enter any sensible search text.

In basic search mode the plugin will first determine all search items in the search string which are seperated by blanks (whitespace). It will then look for images which have at least one of the search items enclosed in their selected meta data fields (corresponds to a logical OR condition).

In extended search mode the plugin interprets the search string differently. Now it takes the whole text, including entered spaces, as a single search item unless it finds predefined delimiters. These delimiters again seperate the search string into seperate search items.

For logged in users or for static searches there is a special search option available: g:<gallery id>.
This will list all images of the gallery with Id <gallery id>.
The result list will also provide the gallery name and gallery id with underlying links to the backend gallery administration page or to the gallery page, if such a page is defined for the NextGEN Gallery in the backend.

There are other special search options available like r:<number> for searching most recent images or l:<number> for last uploaded images.
You can also do multi-keyword searches like „sun & clouds & summer“ which will search for all images satisfying all three single search conditions (in the given example).
You can negate searchstrings by „&- searchstring“.
You can restrict searchstrings to dedicated fields like „&t sun &t clouds“ which will only search in tags.

A search string can have an escape character +/- at the beginning to switch between basic and extended search mode. It can have escape options at the end to switch dynamically between display options.

For an extended documentation see qualified search examples.


NGG Smart Image Search widget

screenshot 1: widget display for search definition

NGG Smart Image Search result list

screenshot 2: search result list

NGG Smart Image Search settings page

screenshot 3: settings page

NGG Smart Image Search public default parameters

screenshot 4: public default parameters

NGG Smart Image Search private default parameters

screenshot 5: private default parameters

Benachrichtige mich bei
Inline Feedbacks
View all comments
Aaron Leung
27. März 2023 11:02

Hi Harald, it’s me again. I’ve moved my WP site from my NAS to a proper web host and come across this problem with this plug-in. Whether I’m doing an advanced search or using its widget, I get this error message: Undefined constant „Modernizr“. I’ve even tried uninstalling and reinstalling the plug-in but the problem persists. Hope you’re able to help. Only the widget, which titled „Image Search“, is available for the public if you want to test it. Thanks a lot!

Akira Ibusuki
29. Oktober 2022 20:20

Dear Harald, After several hours of search, I reached to your page and found your great search tool for WP Galleries. It works very well with my free version of NextGen Gallery. Thank you so much for your creating such program and sharing with us. Then I have a question about the optional parameters. In my environment, none of parameters seem working. It just reports error as „Warning: shortcode parameter has wrong format: 0=“ display=ngg_basic_thumbnails“ „. Below this Warning, searched images are shown in normal gallery form, but not in thumbnail form. my short code in the page is as below.… Weiterlesen »

Aaron Leung
8. November 2021 3:34

Hi Harald, First of all, thanks for writing this useful tool! I’ve added this to my private WordPress site almost as soon as I started using NextGEN Galleries. As it’s just a private photo gallery site, I seldom use this tool. So I’m not sure whether my current problem is related to the change of the folder location of the WordPress files on the server yesterday. My WordPress site is hosted on my Qnap NAS. It used to be done via Qnap’s WordPress app. After the recent firmware update along with the WordPress app, I couldn’t access to the site… Weiterlesen »

Last edited 2 Jahre zuvor by Aaron Leung
Richard Chapman
30. August 2021 23:01

Hello Harald,

I don’t know if you can help me with this, but I was wondering if there’s a way to get the search results of Smart Image Search to display other fields, added using a tool like like Custom Fields or NGG Custom Fields?

I don’t need it to search that field, just display it in the results along with Image Title, Description, Tags, etc.

My goal is to show the searcher what territories an image has already been published in. Having a separate field for that would seem a lot clearer than putting it in the tags.

Rob Boerlage
25. Juni 2021 12:36

Hello Herald,

Do you know if there is a way of me translating te results into Dutch?



Rob Boerlage
25. Juni 2021 10:44


I like your plugin, but on ticking the searchbox a message is shown that the ‚this is not a secure page‘ en it goes to a empy screen giving me a choise to continu or abort. The resuts are the same, it doesn’t proceed in searching…

Please help!


23. Mai 2020 11:48

hello, thanks for your plugin. I have a question;
I build my site not in the root , but in a map.
so not in
but in exampledomain/
I change and move my index.php to the root.
So by calling the site it will apear without /site.

Your plugin works fine when it is installed in the root (i tested it by another site).
But on my site in a map, the plugin is calling the search page with /site.
So it cannot be found.
Where can i change the calling? (i am familair to plugin editor)

16. Mai 2020 16:33

erstmal ein fettes Dankeschön für dieses Plugin!
Bei der Darstellung der Suchergebnisse bekomme ich am Anfang der Seite Fehlermeldungen angezeigt. Wissen Sie, was das zu bedeutet hat, bzw. was ich tun könnte?

Notice: Undefined variable: hr_SIS_search_limit_type in …/wp-content/plugins/ngg-smart-image-search-3-1-2/public/class-ngg-smart-image-search-public.php on line 1004

Notice: Undefined variable: hr_SIS_search_limit_type in …/wp-content/plugins/ngg-smart-image-search-3-1-2/public/class-ngg-smart-image-search-public.php on line 1007

Notice: Undefined variable: hr_SIS_search_gallery_id in …/wp-content/plugins/ngg-smart-image-search-3-1-2/public/class-ngg-smart-image-search-public.php on line 1098

Notice: Undefined variable: hr_SIS_search_limit_type in …/wp-content/plugins/ngg-smart-image-search-3-1-2/public/class-ngg-smart-image-search-public.php on line 1119

Notice: Undefined variable: hr_SIS_search_limit_type in …/wp-content/plugins/ngg-smart-image-search-3-1-2/public/class-ngg-smart-image-search-public.php on line 1123

Vielen Dank im Voraus!


Richard Chapman
4. März 2020 23:50

Hi Harald, First of all, thanks for providing us with this great plugin. I was looking for just this functionality in WordPress for a very long time but could find it nowhere. At one point I thought my only option would be to learn Drupal instead, so you have saved me a great deal of work! I have a question I hope you might be able to help me with: I’d like to change some wording in the interface – specifically, where it says „X image(s) found for searchstring Y“. For my target audience, I would like to customise that… Weiterlesen »

Jonathan Sachs
3. März 2020 18:52

Having trouble figuring out how to instruct site visitors to form a query properly. At our site: if you seach for „port“ you also get keywords such as „sport“. I have tired putting spaces before and after „port“ but not working. Help?