Forums

Search multiple categories (10 posts)

  1. Stacy
    Member
    Posted 5 months ago #

    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 )

  2. SwansonPhotos
    Member
    Posted 5 months ago #

    Is this for selecting a region?

    Using a Custom Menu structure, you can create custom links in the form:

    http://example.com/?category=category1+category2+category3 (Region 1)

    category1=state1
    category2=state2
    category3=state3

    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.

  3. Stacy
    Member
    Posted 5 months ago #

    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.

  4. SwansonPhotos
    Member
    Posted 5 months ago #

    Site link?

  5. SwansonPhotos
    Member
    Posted 5 months ago #

    Correction, above works when it is tags only (tag+tag+tag)...

    Use form:

    /?cat=970,971,972 where the # is the cat id.

    See this: http://wordpress.stackexchange.com/a/3696

  6. Stacy
    Member
    Posted 5 months ago #

    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.

  7. Stacy
    Member
    Posted 5 months ago #

    * these are subcategories of different categories

  8. Stacy
    Member
    Posted 5 months ago #

    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?

  9. texins5
    Member
    Posted 1 month ago #

    This plugin works great for searching multiple categories!

  10. Stacy
    Member
    Posted 1 month ago #

    Someone recommended that I downgrade the plugin. Now it filters.

Reply

You must log in to post.

About this Topic