A Widget for Searching the Media Library by Taxonomy

Version 0.6 of this plugin includes a widget for searching the WordPress Media Library by taxonomy, title, caption, author and gallery. The search results are displayed as a WordPress gallery. I.e., the search widget dynamically generates a WordPress gallery based on search criteria.

The Administrator’s Interface

Selecting the Fields

search-administrator-interface

In addition to searching by taxonomies, you can also search by description, author and gallery. The number in parenthesis is the count of images with a value for that field. A search of the description (post_content) field will also search the caption (post_excerpt) field and the title (post_title) field. The widget will display only the selected fields – (1). You can change the order of the fields by drag and drop. The widget will display a maximum number – (2) – of distinct values per field in order by decreasing frequency. If a field has more than the maximum number of distinct values then a input text box is also displayed.

Setting the Gallery Options for Search Results

settings-for-search-widget

You can set options for the dynamically generated gallery by selecting Settings -> ‘nggtags for Media Library’ from the Dashboard and editing the field ‘search results options’. The options are the options for the WordPress gallery shortcode.

Styling this Search Widget

You can style this search widget by editing the css file nggml_search.css found in this plugin’s directory.

The User’s Interface

search-user-interface

The user clicks Open – (1) – to display the search criteria for a particular field. The widget will display a maximum number – (2) – of distinct values per field in order by decreasing frequency. If a field has more than the maximum number of distinct values then a input text box is also displayed – (3). The user can specify whether all of the conditions (AND of the conditions) must be satisfied or any of the conditions (OR of the conditions) must be satisfied – (4) – by the images to be included. A search of the description (post_content) field will also search the caption (post_excerpt) field and the title (post_title) field. The search results will be displayed as a dynamically generated WordPress gallery. The images will be ordered according to priority.

Download

This plugin can be downloaded from the WordPress Plugin Repository.

How to report problems, ask questions, make comments, …

Please post your problem reports, questions, requests and comments to the nggtags for WordPress Media Library Support Forum.