Posted: May 14, 2015 at 1:40 am
|
By default the Venue Address displays the State Code. |
|
Hi Geoff, As one of 2 Brits on the team, and with me also living in a different EU country with even different requirements, this was something we were also concerned about. What the developers have done is allowed the code section of the states/regions/provinces/countries to be larger. This means that instead of a limited 6 character code, you can put (almost) what you want there and it will show instead. So what I have done is simply replace the codes with the counties. Screenshot http://take.ms/4pUfZ Going from this: http://take.ms/xdMOx (showing the weird code) This should have been from 4.6.20 onwards, but updating to the latest version will mean you definitely have access to that change. Does that help? Anything else I can help with regarding this topic? |
|
Hi Dean, I tracked down this code (line 185, core/db_classes/EE_Venue.class.php) This works for me 🙂 /** I’m now hunting through the code to find where I can remove the Country completely (from the formatted address) as all events will be in UK and thus redundant. Again, this seems like a relatively easy job for the developers to add a little more configuration. |
|
Just for reference if anyone else needs to do these things.. For the Country removal I commented out the line from the following function
Line 205: /core/helpers/EE_Formatter.helper.php Hopefully I’ll find a better way before the plugin gets updated and I lose my changes.. |
|
Nice catch with the filter, I wasn’t aware of that one (we have so many of them…) This function can be added to a site specific plugin or Child your themes functions.php file:
That will then toggle the use of the county codes. Site specific plugin info: https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/ Regarding the country, I can’t see a way to remove it, though adding this filter to below the above code will change it from GB to United Kingdom.
I’ll request a filter to remove the country from the address. |
|
Nice one, thanks Dean |
September 12, 2015 at 11:31 am Hi Geoff, We wanted to let you know about an enhancement in the current version of Event Espresso 4 that offers more flexibility for venue addresses. First, please backup your WordPress site and upgrade to the latest release of Event Espresso 4: https://eventespresso.com/wiki/ee4-changelog/ Next, there is some sample code in this link: https://gist.github.com/lorenzocaum/5e2658a1f7e7a9a6b5c0 Here is an explanation of the sample code: In the older versions of Event Espresso, you could change the formatting for the venue address. However, this would apply to all venue addresses. The new enhancement is more flexible as it allows you to change the formatting for certain countries. In the example code, we have an entry for United Kingdom which has a country code of GB. Then we have the actual formatting which doesn’t include the province or the country name. Just below that, we have an entry for Canada which has a country code of CA. In Canada, the zip/postal code appears as the end of the address so the formatting will show it in that order. Below that is an entry for Germany which has a country code of DE with a specific formatting for the address. If you have modified the venue address through an existing function, then you may consider switching to the new one mentioned in the link above. Thanks! — |
|
The support post ‘Show State Name instead of Code in Venue Address’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.