Term Search
-
Hello David
I hope you are fine. I have one question. My images are tagged with Att. Categories gold, silver and bronce. some images are assigned to more than one category.
cat1 cat2 cat3 image1 gold, silver, bronce image2 gold image3 gold, silverHow can i filter images in the Medien-Assistent-Library which are for instance only in the category gold and not in the categories gold, silver and bronce?
thx for your answer
Meggsico
-
Thanks for your question. On the front end you should be able to use the “” parameter of the
[mla_gallery]shortcode to get the results you seek. You can try something like:tax_query="array( 'relation' => 'AND', array( 'taxonomy' => 'attachment_category', 'field' => 'slug', 'terms' => array( 'gold' ), ), array( 'taxonomy' => 'attachment_category', 'field' => 'slug', 'terms' => array( 'silver', 'bronce' ), 'operator' => ‘NOT IN’, ), )"I haven’t tested that but it should be close to what you need.
If you are referring to the “Terms Search” popup window or the “Taxonomy term keyword(s) search” shortcode parameters you can follow the rules stated in the “Terms Search – filtering on taxonomy term names” section of the Settings/Media Library Assistant Documentation tab. You can try entering something like “gold, -silver, -bronce” or “gold, /silver/, /bronce/” for the example you gave.
I hope that gives you the results you seek. 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.
Hello David
Thx for your answer. I’m referring to the “Terms Search” popup. I tried “gold, -silver, -bronce” but it doesn’t work. I got all images with the category gold and all images with the categories gold, silver and bronce.
Meggs
Thanks for your update. I’d like to get more information about your experience.
You wrote “ I got all images with the category gold and all images with the categories gold, silver and bronce.” Does that mean that in your example above you got “image1” and “image3” but not “image2”.
In the Terms Search popup, do you have “All phrases” and “Any term” selected, and the “Exact” and “Whole Word” boxes unchecked? Is Att. Categories the only taxonomy checked?
Have you tried using the Search Media text box instead of the Terms Search popup? You can enter “gold, -silver, -bronce” in the Search Media text box, make sure that “Terms” is the only field selected, make sure “and” is selected and then click “Search Media”.
If none of this works I can tell you how to activate some debug logging so I can investigate further. Thanks for your patience.
Hello David
You wrote “Does that mean that in your example above you got “image1” and “image3” but not image2”. No, it does mean i get image1, image2 and image3
You wrote “In the Terms Search popup, do you have “All phrases” and “Any term” selected, and the “Exact” and “Whole Word” boxes unchecked? Is Att. Categories the only taxonomy checked?”
Yes, everything is as you wroteYou wrote “Have you tried using the Search Media text box instead of the Terms Search popup? You can enter “gold, -silver, -bronce” in the Search Media text box, make sure that “Terms” is the only field selected, make sure “and” is selected and then click “Search Media”“.
No change, i get the same results as before.You wrote “If none of this works I can tell you how to activate some debug logging so I can investigate further. Thanks for your patience.”
OKThanks for the update with answers and further details. As I suspected, further investigation will be required. This will include exchanging additional information such as screen shots and log files, so it will be much easier to continue the dialog by email. I will post a summary here when we have a final result.
Please contact me at my web site so I can give you more information and a way to email me additional information. Thanks for your help.
Thank you for working with me offline to find and fix the MLA defect that caused the issue you reported. My testing revealed that MLA was applying the “items per page” limit to items assigned to the excluded terms. If a large number of items were assigned to the excluded terms some of them would slip through the test and appear in the results.
I have released MLA v2.95, which contains the fix for this defect.
I am marking this topic resolved, but please update it if you have any problems or further questions regarding the fix. Thanks for your patience and helping me find and fix this MLA defect.
The topic ‘Term Search’ is closed to new replies.