Support » Plugin: WP Store Locator » Workaround needed – want to use state only, not address

  • Our project involves listing members of our organization who are located around the US, Canada, and Mexico. These are not brick-and-mortar “stores”, so we aren’t providing their address. We just want to direct users to the website of the “store” not their actual physical location. But we do want them to appear on a map (using marker clusters, so for example all the members in California are just in one cluster at the state hub), and be searchable by state/province.

    In this model, there are two things I am blocked by.

    1) The “add store” interface requires an address, city, and country….but not state. I can get the markers to display properly if I put the name of the state in place of the city, but I would prefer not to have an address or city be “required” for our data entry person (also on the risk of revealing specific member addresses, which would be undesirable).

    2) After a search, the map zooms in to the cluster, rather than staying zoomed out so we can see all the states. This looks rather ugly, because our map visual is highly simplified to basically a plain gray background. I want it to stay zoomed out, so we can still see all the states with all their clusters.

    Would appreciate any advice. I have been reading docs, and I haven’t found any answers yet.


    • This topic was modified 2 years, 4 months ago by  kalico. Reason: improve subject
Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi,
    I’m also having a similar problem when just searching for a ‘state’ in Australia.
    It doesn’t locate any of the stores that are inside that state. example, NSW. I have to enter an exact address in that area for it to sort of work.

    Is there anyway to display all markers / results when someone searches just for a state?

    Plugin Author Tijmen Smit


    @pdeve searching by state rarely works because the locations will oftsen fall outside the set search radius.

    If you for example search for ‘Texas’, then it will start from the center and use the center coordinates the find locations that fall within the set radius. The center of a state may, or may not be in a populated area.

    The easiest way to make a search by state possible, is by simply creating a category for each state, assign the locations to the matching categories, and then let the user select state x, if they search for a location.

    The only alternative is by using a huge search radius, but doing it this way may also result in locations from other states showing up.

    @kalico it’s possible to remove the required fields, but you do have to be comfortable with code. Let me know if you are, then I will point you in the right direction.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Workaround needed – want to use state only, not address’ is closed to new replies.