Skip Navigation

[Resolved] How to remove Country from address field in Maps

This support ticket is created 6 years, 9 months 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Dido 6 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#617077

Hi,

on hidden link I use a Google map with address field.
I'm not happy with the way how the address is displayd.
How can I remove the country from the address?

Kind regards,
Dido

#617206

Hi, I see what you mean, you would like to have more granular control over the address display. This type of customization will require custom code. Once an address field is geocoded by Google Maps, the full address is stored in the database as a single entry. Then it is not easy to parse individual pieces of the saved address, like the country, city name, or postal code. In the past, our developers have decided not to implement feature requests that split the address components - an example here: https://toolset.com/forums/topic/retrieve-part-of-the-address/. I've added your vote for this request, but there's no guarantee they will change their decision.

If you're comfortable with JavaScript, another ticket describes an approach for splitting these components into multiple custom fields when an address is geocoded in wp-admin:
https://toolset.com/forums/topic/separating-content-from-the-address-field/

#619240

Thank you for your answer. I have to live with it by now.