Support » Plugin: WP Store Locator » Filter by multiple categories

  • My store locator has categories such as “Breakfast”, “Lunch”, “Dinner.” The categories are displayed using checkboxes.

    If I check just one, e.g. “Breakfast”, I get all the stores that are open at breakfast time.
    But if I check “Breakfast” and “Lunch”, the expected behaviour is that it will show me stores open for breakfast AND lunch but instead it shows me those that are open for breakfast OR lunch.

    I don’t mind editing code if you can advise me how – I really need it to filter by those that are in ALL ticked categories, not just one.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Tijmen Smit

    (@tijmensmit)

    Whats the URL where this happens?

    It should always include all the data for the included categories, and not a OR b.

    Does it also happen when you disable all other plugins?

    Thread Starter doubleedesign

    (@doubleedesign)

    Thanks for the quick reply!

    I have set up a test site with a handful of stores, with the categories they are in added to the names so you can more easily see the behaviour. I have deactivated all other plugins and activated the TwentySixteen theme, and the issue is still occurring.

    http://storelocator.gooptest.com

    A few examples of expected vs. actual behaviour:

    • If you select “Youth Only”, you will correctly get one result, “Youth Centre (Monday, Cooking Session, Youth Only)”
    • Then if you select “Youth Only” AND “Cooking Session”, the expected behaviour is to get the same result as above; instead you also get “East Melbourne Cooking Lessons (Monday, Tuesday, Friday, Cooking Session)”
    • If you select “Emergency Relief”, you will correctly get three results, all of which are in the “Emergency Relief” category
    • However, if you select both “Emergency Relief” and “Wednesday”, the expected results are “Community Meals Program” and “Mary’s Pantry”, but you also get two others which are in the “Emergency Relief” Category but not in the “Wednesday” category.

    Thanks again for your time and assistance.

    • This reply was modified 7 years, 6 months ago by James Huff. Reason: removed modlook
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Filter by multiple categories’ is closed to new replies.