How the Address system works

Configuration #

Easy Property Listings was developed for world wide use and different countries have different address labels and requirements.

Address settings can can be adjusted from the main Dashboard > Easy Property Listings > Settings >page in your WordPress installation. See the Address section for details on your configuration options. 

Note: The City field is optional and is off by default. Additionally the Suburb, City, State, Post code labels and country display can be adjusted from settings, see the Address section in the Basic Config doc.

Overview #

The address system in Easy Property Listings is designed for flexibility where you can selectively show or hide the full address from display on your listings. This also effects the map coordinates to future protect the exact address of your listing.

Always enter the full address details for your listings and check the Display Street Address option to display the exact street elements (Unit/Street Number/Street Name.


Configuration #

Display Street Address? - CHECKED #

When this is checked then the full address will be displayed on your listings. 

Map Pin 

The exact coordinates will be displayed on your map with a pin icon. 

Lat/Long Coordinate Auto-generation

Coordinates are automatically generated even if they are not generated in the dashboard. 

When the listing is viewed for the first time on the front end and if the coordinates are empty, they will then be generated and saved to the listing. This reduces API requests on subsequent page loads.

Note: You can drag the pin to manually set the coordinates for some listings where the map is new or the listing is difficult for the Maps API to generate, these will not be overwritten.

Displayed Address

Displayed Map


Display Street Address? - NOT Checked #

When this option is NOT checked, the Street level elements of the address will be excluded from display the and map will generate coordinates based on the Suburb only to truly protect the display of the listings address.

Map Pin

A circle will be displayed masking the exact location of the listing.

Lat/Long Coordinate

Even if the coordinates are set in the dashboard they will not be used. The coordinates used are at the Suburb level only and are not saved to the listing on page load to truly protect the true address of the listing.

Displayed Address

Displayed Map


Commercial, Commercial Land and Business listing types #

These listing types have an additional option to display the suburb level element. When this is not checked then the Suburb will be excluded from display.

Display Suburb - CHECKED

This option only takes effect IF the Display Street Address option is NOT checked. When that is checked the Display Suburb option is ignored.

Displayed Address


For developers: the address rules (3.6) #

From Easy Property Listings 3.6, every address function asks the same four questions, so the address is shown or hidden the same way everywhere: the listing heading, archive cards, widgets, maps and shortcodes.

  • $property->show_street_address(): show the street address? Yes when Display Street Address is checked.
  • $property->show_suburb(): show the suburb? Always for residential listings. For commercial, commercial land and business listings: when Display Suburb is checked, or the street address shows.
  • $property->show_address_city(): show the city? Yes when Settings > Address > Additional Address Field is enabled.
  • $property->show_address_country(): show the country? Yes when Settings > Address > Display Country is enabled.

Asking the question in a template or add-on

global $property;

if ( $property->show_street_address() ) {
	echo $property->get_property_meta( 'property_address_street' );
}

Ask the rule instead of reading the checkbox yourself, so your output always matches the rest of the site.

Changing the answer with a filter

Each rule has a filter: epl_listing_show_street_address, epl_listing_show_suburb, epl_listing_show_address_city and epl_listing_show_address_country. For example, never show the street address on rentals:

add_filter( 'epl_listing_show_street_address', function ( $show, $property ) {
	if ( 'rental' === $property->post_type ) {
		return false;
	}
	return $show;
}, 10, 2 );

Because every address function asks the same rule, this one filter hides the street address everywhere at once.

More in Address rules and Conditional tags.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.