Support

Home Forums Event Espresso Premium Address format for Venue is wrong for Sweden

Address format for Venue is wrong for Sweden

Posted: March 1, 2016 at 2:59 pm


Andreas

March 1, 2016 at 2:59 pm

Hi,

I am using Event Espresso for Events that takes place in Sweden.
When I have registered Venues, I do see that the order of the address is wrong plus that it states Unknown.

I guess it has to do with the State field. In Sweden we more or less never ever use State.

So, my questions are:

1. How do I remove the Unknown text (which seems to be State)
2. How do I change the order of the address structure.
In Sweden we have the following order: address, zip, city, country

Thank you very much in advance!

Kind regards,
Andreas


Josh

  • Support Staff

March 1, 2016 at 4:30 pm

Hi Andreas,

You can set the address format by using Event Espresso 4’s filter hook API. Here’s some example code:

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


Andreas

March 2, 2016 at 1:54 am

Thank you Josh!

So I guess it is OK to add the above code, except the opening php tag, to my Iced Mocha functions.php file?

Thank you for such quick support!

Kind regards,
Andreas


Tony

  • Support Staff

March 2, 2016 at 2:16 am

So I guess it is OK to add the above code, except the opening php tag, to my Iced Mocha functions.php file?

I would advise against using the functions.php file unless you are using a child theme of Iced Mocha, simply because if you update Iced Mocha you’ll overwrite the functions.php file and be back to square one (and you may not notice at the time)

If your using a child theme this is not a problem, Iced Mocha can continue to update and the child theme holds its own functions.php file.

If not it would be best to use the functions plugin Josh mentioned:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


Andreas

March 2, 2016 at 2:30 am

Hi Tony!

Thank you for a super quick response! You guys are amazing!

I created a site specific plugin and it worked super!

Follow-up question:
Will this now also affect the tickets that are being created when the Venue address is mentioned there as well?

Kind regards,
Andreas


Tony

  • Support Staff

March 2, 2016 at 2:42 am

It should do yes but do you have an example if can view so I know exactly where you are referring to?


Andreas

March 2, 2016 at 3:21 am

I do not have an example yet, as the registration will go public in just one hour. Then I will be able to produce an example, as well see how it will look like. ๐Ÿ™‚


Tony

  • Support Staff

March 2, 2016 at 3:34 am

OK ๐Ÿ™‚

The formatting for the address should be used anywhere the address is output, but if you do find anywhere that it is not, please do let us know.

The support post ‘Address format for Venue is wrong for Sweden’ 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.

Event Espresso