Support » Plugin: GEO my WordPress » Using an existing xprofile field as location…. ?

  • Martyn_



    Not sure if this is an FAQ or not.

    My xprofile already contains city/country fields. I’m a little concerned about having extremely accurate locations set for privacy reasons, and I’d also rather not have the additional locations tab visible as I’m trying to keep all user data in one place for simplicity.

    Hence I’m wondering if there is a method of populating GEOmWP location for each user from the existing xprofile data – I suppose I’m thinking that if a query on location fails (because its not set), then it should try to set it from the existing xprofile fields.

    If not, any pointers as to where best to try to hook that in would be loved.

Viewing 1 replies (of 1 total)
  • Plugin Author Eyal Fitoussi


    Hi Martyn,
    GEO my WP will not be able to use an existing data because only the name of the place is not enough in order to create a search query. The locations must have Latitude and longitude attached to them in order to be searchable.
    That is why it must go trough the “Location” tab. The user enters his location, GEO my WP take the location , geocode it in order to get the latitude and longitude and it saves all the address components as well as the lat/long in a custom table in the database. The search queries uses this table to find members.

    what you can do:
    1) use the location tab but hide certain fields using simple CSS display:none. So if you leave only the fields for city and state or zip code the location being saved in database will not point to the exact location of the user.

    2) There is a premium add-on called Xprofile fields that you can read about and get here.
    The add-on will allow you to use the profile fields in order to save location instead of or together with the “location tabs” ( you will have the option to disable the location tab).
    Using that you will be able to choose which field of your profile fields you want to use for the location. can be single address field or multiple fields. Moreover, users will be able to add their location during registration.

    Hope that help

Viewing 1 replies (of 1 total)
  • The topic ‘Using an existing xprofile field as location…. ?’ is closed to new replies.