Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Change default options › Reply To: Change default options
Hi Bjoern,
This is a really tough question. The content type is defined during the query, however you can actually change that before the results are processed.
You will need two functions, one to add the additional groups, and another to modify the results group variable to assign them to the new groups as you want to.
Add this custom codes 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!
Adding the new groups code
Change the $new_groups variable to create new groups.
Appending the results to these groups
The g_content_type property on each result defines which group is it assigned to. This custom code will assign all the results to group_key1 group. You can use this as a template, use conditional logic there, or whatever you like.
I hope this helps!