Skip Navigation

[Resolved] Extract city and country from address field

This support ticket is created 8 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 5 replies, has 2 voices.

Last updated by Shane 8 years ago.

Assisted by: Shane.

Author
Posts
#391048

First of all, I tried sending you debug info but with your new admin layout interface I could not find it anywhere! Anyway, I am using latest versions of WordPress and plugins(at the date of the post). Please let me know where I can find the debug information.

Now, I will be filtering a View with a country and city custom field but my users will be entering address information through the new Google maps address field. Now, how could I extract the city and country (or even the ZIP code) from that field so I can populate the fields that will be used for filtering?

#391072

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi George,

Thank you for contacting our support forum.

Unfortunately not, this is not possible since the address field is one long continuous address. It is not possible to separate the information for a filter.

This City and Country information would need to be stored in separate custom fields in order for you to be able to filter by them.

Thanks,
Shane

#391075

Ok thanks. Can you please let me know where I can find the debug information after the new interface redesign?

#391076

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi George,

Actually the debug information section has been removed from the plugin temporarily, but will be added back in a future update.

I'm not sure why it was removed but i'm sure it's for a good reason.
Thanks,
Shane

#391088

Hi Shane in this post
https://toolset.com/forums/topic/google-maps-with-zipcode-cityname/

Bigul has provided some code for replacing longtituda and latitude with the address zip code. Couldn't this code be reversed to achieve what I want? Shouldn't there be a Google API that I could work with? Could you maybe ask one of the developers just to make sure?

Thanks again for your support.

#391122

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi George,

Unfortunately not, since we not utilize an address field instead of the longitude and latitude. Even if we were to do something like this is would be out of the scope of what our forum support provides.

The reason is because this is not something that can be achieved with the use of our API only.

Thanks,
Shane

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.