Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Exlcude variations from search results IF the variable/parent product is shown? › Reply To: Exlcude variations from search results IF the variable/parent product is shown?
Unfortunately there is no option for that, as it cannot be filtered during the database query, only via post processing.
However I recall that about a year ago someone asked a similar questions, and I have found a custom code that was working for him. I searched and found the snippet. 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!
This might do the trick, although it’s not the best solution, but the only I can think of.Best,
If you like my products, don't forget to rate them on codecanyon :)