The plugin for searching multiple categories is not working. How to do this by query? Users need to filter as such: Show all posts that are each categorized under all of 3 these state1,state 2, state 3. Not any posts that are in either.
( I might be lucky for an answer this time )
Is this for selecting a region?
Using a Custom Menu structure, you can create custom links in the form:
This will list posts that have all 3 categories 1 2 and 3…
If you are using a form to select the states then also use the form submit to create the url.
The theme I a using already uses a custom menu drop down for cats. My url shows
/?category=34 or /?category=34,22 or /category/state/al/ and I’ve tried /?category=34+22 but that only shows everything. I’m trying to retrieve from different subcats. I’m not using a form.
Thank you for helping.
Correction, above works when it is tags only (tag+tag+tag)…
/?cat=970,971,972 where the # is the cat id.
I’ve tried that and it pulls posts for either of the cats as stated in the link you shared “category__in means the post must be in at least ONE of the specified categories (an OR query).” The results should be in all of the specified categories.
I’m trying to retrieve posts that’s marked in all 3 state1,state2,andstate3, not just state1 or another combo.
For example the posts are agencies, how to search for an agency that recruits cat=females, FL, Walk-ins. Is it possible to search like this?
I don’t want to convert to tags bc I may end up needing the hierarchy and it will be a mess to switch back if so.
It’s been over 6 hrs on this and somehow I figured it out.
The cats I tested with url http://example.com/category/category1+category2+category3 each showed errors because the descriptive slug didn’t match the cat name. I can now use this for any subcats.
Unfortunately there’s no plugin widget option for this. Is there any to use a search query rather than changing the url?
- The topic ‘Search multiple categories’ is closed to new replies.