Home Forums General Issues Extracting City from Google Map Field Reply To: Extracting City from Google Map Field

  • Hi @aaronrobb

    While it would be possible to hook into acf/save_post and extract the value from the map field into another field (could be a hidden field if you like) I’m not sure how you would go about making sure you ONLY get the city.. It can be any length of string, with or without spaces etc. etc.

    When I’ve had situations like this in the past I’ve actually used a custom taxonomy for location as well. It can be just for cities but you can also use a hierachial one and let the user apply country > region > city > part (really as far or not as you want).

    The taxonomy makes for much better filtering options as well 🙂