I've built a classifieds site, using Toolset Maps to manage location data. I want to display the location on the listing, but not the full address - ideally, I would just like to show the city.
I can easily go to Fields and Views > Address, and get a shortcode that shows something like: "123 Road Avenue, Toronto" but I don't want it to be too specific here, and would love a shortcode that would just show "Toronto". Is something like this available?
I haven't found any relevant documentation for this so far.
Another possibility would be something like the Canadian Classifieds site, Kijiji, where they show a map with a circle giving the approximate location. I've attached an image of how this looks. I'll go with whichever is easier though.
Hello. Thank you for contacting the Toolset support.
To display only the part of the address from map address field value you will have to write custom shortcode for that where you should pass the current complete address string to that custom shortcode and the shortcode should return the only city name.
If you do not know how to do it, please get in touch with me and share admin access details and problem URL where you want to display the city and I'm happy to share solution.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. I have set the next reply to private which means only you and I have access to it.