All locations without an address show up in the same spot.

This topic contains 11 replies, has 2 voices, and was last updated by  Guust 8 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #342454

    David Wagner
    Expired Member
    Post count: 13

    Our directory will have users who do not need to give out physical addresses (such as a website or magazine) so we set it so that addresses are not required. Problem is it defaults the city and state and country to Phoenix, Arizona, USA – where we are.

    Is it possible to omit the map if the address is omitted?

    Here’s an example: https://growbay.com/cannabiz-directory/united-states/arizona/phoenix/cannabis-growers-supplies/grassroots-provisions/

    http://growbay.com
    Login with “getgrowing”

    #342469

    Guust
    Moderator
    Post count: 29970

    You can create a CPT that does not need addresses.
    https://wpgeodirectory.com/docs/core-general/#physical

    You need 2 different CPTs: one with addresses and one without, or things will not work.

    #342885

    David Wagner
    Expired Member
    Post count: 13

    Thanks for your help. We need all the businesses to be in the same CPT. Is there no way whatsoever to determine if an address is omitted and not show the map? Can’t this be done in PHP? Also, just realized, it would also have to not put the city and state in the sidebar. One way or another we have to figure out how to make that work. Thanks again.

    #342924

    Guust
    Moderator
    Post count: 29970

    Sorry, but that cannot be done. Either they all have addresses and coordinates, or none of them do.

    #342934

    David Wagner
    Expired Member
    Post count: 13

    Why does it choose Phoenix, Arizona? Can I at least change that?

    #342972

    Guust
    Moderator
    Post count: 29970

    Because that is what you set as your default location, most likely.
    You can change that, by changing all the data for the default location, but that will mean you have to re-do all addresses for listings in Phoenix.

    #342977

    David Wagner
    Expired Member
    Post count: 13

    Where do I change the data for the default location? I saw a screen shot somewhere showing it in the GD menu under permalinks but it’s not showing in our installation.

    #342979

    David Wagner
    Expired Member
    Post count: 13

    Another related question. If I enter a listing and don’t add an address then it doesn’t show an address on the detail page. Which is great. But if I add anything there at all and then try to delete it so that there’s no address it just goes back to what I entered originally. Any way to fix that? Can I go in and edit the database manually and delete the street address field? I believe I can figure out a way to not show the map widget if there’s no address.

    #342988

    Guust
    Moderator
    Post count: 29970

    GD > Multilocations, and edit the default location details. See image.
    I highlighted the region “all”, there is no such region, you need to merge that location with another location, see https://wpgeodirectory.com/docs/manage-location/#merge
    Similarly, this country does not exist: …/location/all/all/all/

    Either all listings have addresses and coordinates, or none of them do.
    You should not make addresses non-required.

    All listings is a CPT with addresses need address details including street address [but you can use just the Business Name], city, region and country.

    PS: IGNORE SECOND ATTACHMENT

    #343000

    David Wagner
    Expired Member
    Post count: 13

    I’m determined to make this work the way I need it to work. There are too many businesses in this industry that don’t want their street address given out to just give up on it.

    I discovered that if I select a country, a state, and a city, but don’t enter a street address, and then click the pin on map button, it adds the country in the street address field. But it does put the pin in the correct city. Then I delete the street address field and publish.

    It doesn’t show the address in the detail page (awesome), and it shows the pin on the map in the right city (awesome). It also doesn’t add an “all” to the multilocations.

    Here’s a test post. https://growbay.com/cannabiz-directory/united-states/alaska/anchorage/cannabis-activism-non-profits/test-2/

    So now, all I have to do is delete the street address from the listings that have already been entered where we just entered “United States” or “National” or whatever instead of an actual street address. I assume there’s a way to edit the database.

    What kind of problems do you foresee if we do it this way?

    Thanks for your patience in this matter. It’s very important to us.

    #343004

    David Wagner
    Expired Member
    Post count: 13

    I suppose I should add some instructions. Something like this:

    TO OMIT YOUR STREET ADDRESS, BUT SHOW YOUR CITY AND STATE:
    1) Select your country, state, and city.
    2) Add the pin to the map.
    3) The city name will populate the street address field.
    4) You can then change the street address to a general location such as “Downtown” or “West Side” etc.
    5) Publish your listing. It will not show a street address.


    TO OMIT YOUR ADDRESS FROM THE LISTING ALTOGETHER:

    1) Note that all listings will put a pin on the map!
    2) Set the country, state, and city where you would like the pin to show up.
    3) Add the pin to the map.
    4) DELETE THE STREET ADDRESS FIELD AND LEAVE BLANK.
    5) Publish your listing. It will not list any address information, but it will show the pin.
    If you do not select a location the map will default to Phoenix, Arizona.

    #343016

    Guust
    Moderator
    Post count: 29970

    That is what I said: “including street address [but you can use just the Business Name], city, region and country.”
    The system needs the following data:
    * street address: can be the business name, country name or Mickey Mouse, but it cannot be empty
    * city
    * region
    * country
    * latitude and longitude – you can do that by dragging the marker, or clicking “Set on map”.

    I see you turned the “required” off, so you can indeed submit without a street address. I am not sure what issues that might bring without checking, but if it works for you, well, then it does.

Viewing 12 posts - 1 through 12 (of 12 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount