I am playing around with creating a "hidden" K2 category that uses the base site template, content, etc. but is only called from a different url for use in a Facebook iFrame. So far, it is working out quite well with one exception - the base Joomla search is returning results from this K2 category.
In searching, I found the following plug / override for the Joomla search to exclude sections and categories. However, it only works for base Joomla categories, not K2 categories.
In tracing the code, it appears that the onSearch function in the /plugins/search/k2.php file is what is being called somehow by the Joomla search to get the K2 matches. This is about the limit to my tracing ability though, so has there been any attempt before to exclude certain K2 categories from the Joomla search? So far Google is not giving me any pointers.
This has been a longstanding challenge for me - I found a solution by adding this line of code to line 56 of the Acesearch K2 plugin (commercial extensions) :
Go to line 53 where you will see the following code: