Skip Navigation

[Résolu] How to remove Country from address field in Maps

This support ticket is created Il y a 6 années et 1 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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 réponses, has 2 voix.

Last updated by Dido Il y a 6 années et 1 mois.

Assisted by: Christian Cox.

Auteur
Publications
#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.

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