Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search Filters
- This topic has 5 replies, 2 voices, and was last updated 8 years, 4 months ago by
Ernest Marcinko.
-
AuthorPosts
-
February 1, 2018 at 10:55 pm #16609
boconpro
ParticipantHello,
first of all: great plugin! Love it!
We have setup a search for our website including a category/terms selector. Here the user can choose product categories.
All categories are enabled by default. Deactivating a category doesn’t change anything, the deactivated category is still searched and results from the category are being displayed.Do you have an idea what might cause the problem?
All categories used in the filter are parent categories, the products themselves are located in sub-categories. I thought that by deactivating the parent category the sub categories are also deactivated. Is this so or might this be the reason?Thanks for your help!
Regards
ThomasFebruary 2, 2018 at 10:48 am #16615Ernest Marcinko
KeymasterHi Thomas,
I was trying to check the URL provided, but I’m getting a ‘503 service unavailable’ error at the moment.
I might have an idea though. Are the products marked with the parent categories as well, or only with the sub-categories?
If only the sub-categories, then it explains it, as in that case there is no direct connection between the unchecked term and the product. Let me know if this is the case, I might be able to construct a custom code solution to exclude the parent categories as well.February 2, 2018 at 11:28 am #16617boconpro
ParticipantHello Ernest,
thanks for the fast reply!
I have checked, the products are marked with the sub-category only. That explains it.
Will a customization be complicated? If so, we can also adjust our products.
Regards
ThomasFebruary 2, 2018 at 12:59 pm #16619Ernest Marcinko
KeymasterHi Thomas,
It should not be too difficult I think. I have quickly made a custom API code that changes the search parameters before the search, and if finds parent terms excluded, it excludes child trems as well.
Add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!
Let me know if you need help with this.
February 2, 2018 at 2:27 pm #16621boconpro
ParticipantHello Ernest,
looks like its working perfectly!
Thanks for your fast help, really appreciate it!Regards
ThomasFebruary 2, 2018 at 2:27 pm #16622Ernest Marcinko
KeymasterYou cannot access this content.
-
AuthorPosts
- You must be logged in to reply to this topic.