Oh my! I confused myself horribly: so regular search does work with multiple categories for me, I just didn't realize it because I had only commented out my call to Search Reloaded, not deactivated it. Once I deactivated it, I could call multiple categories to search.
My next problem was to allow it to search only posts belong to all of the categories listed, and not just any; fortunately I stumbled across just such a plug in:
So now I just needed to code an "advanced search" web form that allowed users to enter a search term, select the categories to be searched, and choose whether or not the posts returned appear in any category chosen or all categories chosen.
The first issue I encountered is that if no search term is entered, the archive template is returned rather than the search template, but it appears the actual results returned on the archive page are accurate, so I think simply modifying the archive page to explain the results more accurately will be okay...
Another problem I had to get around was serializing the checkbox values (categories each have their own checkbox on my advanced search webform) within the querystring, as opposed to separate key/value pairs (as separate pairs, only the last
cat= is utilized by the system); in other words, change from this
cat=1&cat=2&cat=3 to this
cat=1,2,3. My solution was to process the submission before sending it on to the search page
$s = $_REQUEST['s'];
$intersect = $_REQUEST['intersect'];
$url = $_SERVER['REQUEST_URI'];
$cats = $_REQUEST[cats];
$cat = implode(",", $cats);
I keep thinking there must be a more clever way to get around this, so I’d be curious to hear ideas, but this is what I’ve got for now.
My next problem is my extensive use of child categories; the first issue resulting from this is that the intersect plugin chokes on parent categories and the second is I don’t always want a parent included when a child is selected for search (I believe this second issue is the reason for the choke--Intersect is being sent all these “extra” categories it wasn’t expecting--so I’m hoping the solution to one is the solution to both).