epl_get_the_address
epl_get_the_address( $address_args = array(), $sep = array(), $country = false, $prefix = array() );
Retrieves the listing address.
Parameters
$address array Optional
Address components.
// Address Values 'sub_number', 'lot_number', 'street_number', 'street', 'suburb', 'city', 'state', 'postal_code', 'country',<br>
$sep array Optional
Override default separators for each address components here.
// Sep defaults. 'sub_number' => '/', 'lot_number' => ' ', 'street_number' => ' ', 'street' => ', ', 'suburb' => ' ', 'city' => ' ', 'state' => ' ', 'postal_code' => ' ', 'country' => ' ',
$country bool Optional
Return country with true, default false.
$prefix array Optional
Customise the prefix for each address component.
Return
string
More Information
When using this function the address details returned are passed through the display address feature. See the guide on How the Address system works for more details.
Source
File: lib/includes/functions.php
. View function
Use Case
// Fetch the street and remove the separator $street = epl_get_the_address( ['street'], ['street' => ''] ); // Fetch the city and state and add a comma after the city. $city_state = epl_get_the_address( ['city', 'state'], ['city' => ', '] );