Custom complex query
-
Greetings;
I’ve launched a website using one of WordPress premium themes, and used some plugins to enhance the functonality of it. As of now, I need to write a query for a part of the website, and since I’m not a WP developer, I’m gonna need some help on it.
The website’s content mostly consists of categorized images. I’ve installed and used an addon to be able to create different taxonomies for my Media Library. So far I have Field, Technique, and Customer as my taxonomies.They all have their own entries like Field1 Field2 Field3, Tech1 Tech2 Tech3, and Customer1 Customer2 Customer3 and so on … . So, every time I upload an image to the library, I check relevant options from each of those 3 taxonomies for that image.
Later on, I installed and used another plugin for advanced search. By using that plugin, I’m able to show those 3 taxonomies on front-end, and by choosing desired options, users are able to see the relevant images. To give you a better look, when you open the advanced search page, you see 3 drop-down menus each representing those 3 taxonomies and all of their defined options. They are not dependent on one another.
But I need more complex and advanced type of search. Let me give you an example.
Let’s consider we have 10 images uploaded to the library. For 8 of those images, Field2, Tech1, Tech2, Customer2 and Customer3 are checked on back-end, and for the other 2, Field1, Tech2, Tech3 and Customer 1 are checked for instance. As you can see, there’s no single image for which the combination of Field2 and Tech3 are checked.
I want the search feature to work this way, that, when user checks Field2, only Tech1 and Tech2 are selectable and Tech3 gets disabled, simply because there’s no image uploaded with Field2 and Tech3 yet.To sum it up, I’d like to create some sort of dependency only on the front-end. Something like this : Field > Technique > Customer.
Helps are appreciated in advance.
- The topic ‘Custom complex query’ is closed to new replies.