- October 24, 2018 at 9:29 pm #19615
We are using AjaX Search Pro on our website and are really happy with it.
I would love to offer our users the possibility to search for products within the current product category. Since we have quite a few categories ( approx. 50) it is not an option for us to have the user choose the specific category from a dropdown.
Is there any way to limit the search to the current product category only?
Or even better, is there a way to limit the search to the filtered products in the product page? Maybe an example explains best what I mean:
The user looks at the product category rings. He uses the woocommerce product attribute filters to get only rings with the material gold. Is there any way to implement a search form that enables the user to search within these gold rings for rings with diamonds?
I am pretty sure that there is no backend option for this and that some coding will be needed. Thats no problem, I am willing to go through it. I just would appreciate any help that points me in the right direction and gives me a start.
Thanks for your help!
ThomasOctober 25, 2018 at 1:45 pm #19621
The first one should be actually possible. There is this knowledge base article, that explains how to do this with posts and categories, I will try to construct a custom code based on that.
This should be very close to a possible solution:Best,
If you like my products, don't forget to rate them on codecanyon :)
October 25, 2018 at 7:48 pm #19627
thx for the fast reply.
It seems to work fine.
When I copy it in the functions.php file It is used by all search instances.
Is there a way to limit it to a certain search instance?
ThomasOctober 26, 2018 at 8:40 am #19631
You must be logged in to reply to this topic.