Searching custom fields in attachments
-
Hi. I have a list of custom fields (ACF) in my attachments and like to search for some content in these fields. Perhaps you can help me. Looking forward to hear from you.
I have a shortcode on a special page for search activities in place
[mla_gallery s="{+template:({+request:sk+})+}" link=file mla_search_fields=title,name,excerpt,content,alt-text,file,terms]
and would like to extend it for custom fields
[mla_gallery s="{+template:({+request:sk+})+}" link=file mla_search_fields=title,name,excerpt,content,alt-text,file,terms multi_search="custom:*='{+template:({+request:sk+})+}'"]
Idea is to give user the opportunity to enter a string which will be searched everywhere.
I ‘ve seen mla-multi-search-example.php and want to make use of the parameter All Field Names. For now I am searching for a full match, fielda contains ValueA. I am searching for ValueA.
/search/?sk='Hamburg Eichtalpark'
I did a simple test as you proposed in the documentation. Content of the log file is:
[25-Mar-2024 17:29:41] 709 MLACore::mla_plugins_loaded_action() MLA 3.13 () mla_debug_level 0x3 [25-Mar-2024 17:29:55] 709 MLACore::mla_plugins_loaded_action() MLA 3.13 () mla_debug_level 0x3
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Searching custom fields in attachments’ is closed to new replies.