Thanks for finding and applying the “search form and gallery” example in the Settings/Media Library Assistant Documentation tab and for your question. Adding a couple of parameters to your shortcode should get you the results you seek.
In the “Keyword(s) Search” section of the Documentation tab you can find these two parameters:
- mla_search_fields – The fields in which to search. Choose from title, name, excerpt, content, alt-text, file, terms.
- mla_terms_taxonomies – If you include ‘terms’ in mla_search_fields, you can add a comma-separated list of the taxonomy or taxonomies in which to search. Enter the slug(s) for one or more of the taxonomies registered for Media Library items, e.g., attachment_category or attachment_tag. If this parameter is omitted or empty, default taxonomies are specified in the Taxonomy Support section of the General tab.
So, for your example, try something like this:
[mla_gallery s="{+template:({+request:search-string+}|a-bad-term)+}" mla_search_fields=terms mla_terms_taxonomies=attachment_category mla_nolink_text="Enter a search value above to display gallery."]
I’ve added the two new parameters just after the s=
parameter.
At the end of the “Keyword(s) Search section you will find this additional tip:
The mla_search_fields=terms feature is a simple way to extend the search to the terms assigned to Media Library items. If searching on taxonomy terms is your primary goal, consider the more powerful “Taxonomy term keyword(s) search” parameters discussed in an earlier Documentation section.
The terms search feature gives you additional capabilities but requires a bit more work on your part and some explanation of the search syntax for your users. You can decide if that’s worth pursuing for your application.
I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.