Posted: May 15, 2015 at 4:24 am
The “edit venue” page requires a state/province. Not all countries have states/provinces (e.g. UK). If USA or Canada (for example) are enabled in the “Countries” tab, then for UK addresses you have to leave the state/province blank (as none exist). But when viewing an event, it displays “Unknown, ” as part of the address if a state/province has not been chosen. I have now enabled only the UK, but it still causes the same problem. It also inserts “GB, ” into the address. This is incorrect: |
|
Hi Jonathan, could you try adding these filters to your child theme’s functions.php file or a site specific plugin? https://eventespresso.com/topic/address-still-now-showing-correctly/#post-152845 — |
|
That partly solves one of the two problems, thanks. 1. “GB” problem. Now it says “United Kingdom” which is fine BUT it should appear at the end of the address (not before the postcode). 2. “Unknown” problem. I know I could edit all venues to ensure that something is added to the state/province field, but it should be easier to fix the “Unknown” problem. |
|
Hi Jonathan, is that order related to the front-end display for the venue address? If so, you can actually customize the formatting of the address and here is an example: https://eventespresso.com/topic/address-still-now-showing-correctly/#post-143031 — |
|
This is really something that should be built-in (as the way the address appears by default is just no good for the UK) but the code below did the trick for my purposes. Thanks for the help.
|
|
September 12, 2015 at 11:25 am Hi Jonathan, 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. 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 ‘"Unknown" and GB appearing in venue address when viewing event’ 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.