Explaining how the addr_format shortcode option works is difficult, so I will provide some examples.
First, some background.
The addr_format option accepts only a few specific tokens.
Tokens are the % symbols, and the word between, for example, %label%, is a token.
The valid tokens for the addr_format option are:
%label%
[NOTE: unless this is overridden, the label will be the address type.]%line1%
%line2%
%line3%
%city%
%state%
%zipcode%
%country%
When processing the display of the address, Connections will scan for each token and replace it with the corresponding address segment. Each token should only be used once, even though you could use each token more than once, but that is not recommended.
Here’s the default layout of the tokens that create the format of the address:%label% %line1% %line2% %line3% %city%, %state% %zipcode% %country%
Your first question might be, but the address items are stacked in the traditional block layout, not on a single line; how is that being accomplished? The block layout is achieved using CSS, which can easily be overridden to display the address segments inline. How to override the CSS is a separate topic.
On to the examples.
// This will display the address minus the label and country fields. [connections addr_format='%line1% %line2% %line3% %city%, %state% %zipcode%'] // This will display the address with the state and city switched, common in eastern Europe. [connections addr_format='%label% %line1% %line2% %line3% %state%, %city% %zipcode% %country%']