Good to hear from you again, and thanks for the kind words. Thanks as well for your question, which is a variation on these earlier topics:
Search Media by Custom Field
Searching on custom fields
The example you give in your post can be solved with the “Simple Custom Field Parameters” described in the Settings/Media Library Assistant Documentation tab. For your example you can try something like:
[mla_gallery attachment_category=indonesia meta_key=my_custom_field meta_value='1111']
There are some other options you can find in the Documentation tab. You can also look at the more powerful ‘ Custom Field Queries, the “meta_query” ‘ Documentation section for additional solutions.
Your question also mentions the more flexible keyword search parameter (s=
); this is an interesting alternative. In response to the earlier topics I developed the “MLA Custom Fields Search Example” plugin, which is included in the current MLA version. The example plugin includes powerful search capabilities, settings to configure its operation and a “Documentation” tab explaining its features and operation.
To get the example plugin, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “custom” in the text box and click “Search Plugins” to filter the table.
You are looking for the “MLA Custom Field Search Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “Install” rollover action, then go to the WordPress Plugins/Installed Plugins submenu and activate the example plugin as you would any other plugin. Make sure you have the latest version, 1.06, installed.
Once the example plugin is installed and active you can access the Settings/MLA Custom Search “Documentation” tab to learn more about the plugin and its capabilities. If you have any problems or further questions regarding the example plugin, post an update here and I can give you more specific guidance.
The current version of the example plugin supports the admin-mode Media/Assistant and Media Manager Modal (popup) Window “Search Media” text boxes. I regret that it does not support the keyword search parameter in the [mla_gallery]
shortcode. If you give the current version a try and find that it would meet your needs I can investigate the feasibility of enhancing it to support the shortcode.
I will leave this topic unresolved until I hear back from you. Thanks for your continued interest in the plugin.