GeoDirectory builds the listing address from a template of tags. You can change the order of the parts, leave some out (the country, for example) and choose where the line breaks go. You can do it for one block with the address template setting, or for the whole site with a filter.
The default template is:
%%street_br%% %%street2_br%% %%neighbourhood_br%% %%city_br%% %%region_br%% %%zip_br%% %%country%%
How the tags work
The parts you can use are street, street2, neighbourhood, city, region, zip, country, latitude, longitude and post_title. Wrap each in double percent signs. Add a suffix to control what follows the value:
%%city%%outputs the value only.%%city_br%%adds a line break after it.%%city_c%%adds a comma and a space.%%city_brc%%adds a comma and a line break.%%city_space%%adds a space.%%city_dash%%adds a spaced hyphen.
The separator is only added when that part has a value, so an empty field does not leave a stray comma or blank line. To drop a part, leave its tag out.
Change it for one block
The GD > Post Address block has an Address template field. Enter your template there, or use the shortcode:
[gd_post_address address_template="%%street_br%% %%city_c%% %%region_space%% %%zip%%"]
Change it everywhere
To change the address format wherever GeoDirectory outputs the address field, use the geodir_cf_address_template filter. Add this with the Code Snippets plugin or your child theme functions.php and edit the template to suit:
add_filter( 'geodir_cf_address_template', 'my_gd_address_template', 10, 3 );
function my_gd_address_template( $template, $cf, $location ) {
// Street on one line, then city, region and zip on the next. No country.
return '%%street_br%% %%city_c%% %%region_space%% %%zip%%';
}
The filter also receives the field settings in $cf and the output location in $location, so you can return a different template for, say, the listing page and the archive cards.