Commercial For Sale and For Lease filters
Description #
Commercial and commercial land listings show a label before the price: "For Sale", "For Lease", or both when a listing is for sale and lease. These filters change those words.
epl_commercial_for_sale_label: default "For Sale".epl_commercial_for_lease_label: default "For Lease".epl_commercial_auction_label: default "Auction", shown instead of "For Sale" when the commercial authority is Auction.
They change the price on the single listing, in listing loops and in the price sticker list, and the plain-text price.
Usage #
add_filter( 'epl_commercial_for_sale_label', 'my_commercial_for_sale_label' ); add_filter( 'epl_commercial_for_lease_label', 'my_commercial_for_lease_label' ); add_filter( 'epl_commercial_auction_label', 'my_commercial_auction_label' );
Parameters #
$label (string)
The label. Each filter receives only the label.
Examples #
function my_commercial_for_sale_label( $label ) {
return 'Buy';
}
add_filter( 'epl_commercial_for_sale_label', 'my_commercial_for_sale_label' );
function my_commercial_for_lease_label( $label ) {
return 'Rent';
}
add_filter( 'epl_commercial_for_lease_label', 'my_commercial_for_lease_label' );
function my_commercial_auction_label( $label ) {
return 'Auction on';
}
add_filter( 'epl_commercial_auction_label', 'my_commercial_auction_label' );
A commercial listing for lease with its price hidden then shows "Rent POA" instead of "For Lease POA".
Notes #
- There is no separate "For Sale and Lease" filter. A listing for sale and lease shows both labels, each from its own filter.
- The labels for other listing types (Sold, Leased, Under Offer, POA) are in Easy Property Listings > Settings > Labels.
Related #
- Price rules: under offer prices, advertised prices and their filters.
Source #
lib/includes/class-epl-property-meta.php, in EPL_Property_Meta::get_price_plain_value(), get_price() and get_l_price(). For Sale and For Lease since 2.1.8, Auction since 3.0.