Short country format?

Home Forums Calendar Products Events Calendar PRO Short country format?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28960
    Michael
    Participant

    I’m looking for a way to display abbreviations for the country name in the widget list (or anywhere, really). tribe_get_country only seems to have one parameter – how about an option to display ‘UK’ instead of ‘United Kingdom’ etc.?

    Is there a filter I have overlooked?

    This would be especially useful for sites on which the majority of events take place in the same country, with only a few exceptions. And of course to save some space in places like a sidebar.

    #28966
    Barry
    Member

    I don’t believe there are any specific filters for that template tag; you could use tribe_get_event_meta but that’s further upstream.

    Do note however that tribe_get_country() returns its output rather than echoing it, so you could easily filter it yourself by creating a new template tag of your own which converts tribe_get_country()’s output to an abbreviated format (whether that’s ISO 3166 or some other scheme).

    #28974
    Michael
    Participant

    Okay, I can try that if it comes down to it, thanks.

    #28976
    Barry
    Member

    Sure 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Short country format?’ is closed to new replies.