Search Labels: Widget Filters also alters Shortcodes

You can adjust all aspects of the search widget including, labels, in-field labels and select drop downs using the included filters in the plugin.

These are all found in the easy-property-listings/lib/shortcodes/shortcode-listing-search.php file.


Above the field Label Filters

Use these filters to adjust the labels for each search field. They all follow the same code syntax so just adjust the names for the labels you want to change.

function my_custom_label_location() {
	$label = 'My New Label';
	return $label;
}
add_filter( 'epl_search_widget_label_property_location' , 'my_custom_label_location' );

Search Widget Label Filters - Easy Property Listings

Search Widget Label Filters

epl_search_widget_label_property_id
epl_search_widget_label_property_location
epl_search_widget_label_property_category
epl_search_widget_label_property_price_from
epl_search_widget_label_property_price_to
epl_search_widget_label_property_bedrooms_min
epl_search_widget_label_property_bedrooms_max
epl_search_widget_label_property_bathrooms
epl_search_widget_label_property_rooms
epl_search_widget_label_property_carport
epl_search_widget_label_property_land_area_min
epl_search_widget_label_property_land_area_max
epl_search_widget_label_property_land_area_unit
epl_search_widget_label_property_building_area_min
epl_search_widget_label_property_building_area_max
epl_search_widget_label_property_building_area_unit
epl_search_widget_label_property_air_conditioning
epl_search_widget_label_property_pool
epl_search_widget_label_property_security_system

In Field "Any" filters

Use these filters to adjust the "Any" labels that appear in drop down fields.

function my_custom_any_label_location() {
	$label = 'Search Location';
	return $label;
}
add_filter( 'epl_search_widget_option_label_location' , 'my_custom_any_label_location' );

Search Widget Any Filters - Easy Property ListingsSearch Widget "Any" Label Filters

epl_search_widget_option_label_property_status
epl_search_widget_option_label_location
epl_search_widget_option_label_city
epl_search_widget_option_label_state
epl_search_widget_option_label_postcode
epl_search_widget_option_label_country
epl_search_widget_option_label_category
epl_search_widget_option_label_tax_business_listing
epl_search_widget_option_label_global_price_from
epl_search_widget_option_label_global_price_to
epl_search_widget_option_label_price_from
epl_search_widget_option_label_price_to
epl_search_widget_option_label_bedrooms_min
epl_search_widget_option_label_bedrooms_max
epl_search_widget_option_label_bathrooms
epl_search_widget_option_label_rooms
epl_search_widget_option_label_carport
epl_search_widget_option_label_tax_feature
epl_search_widget_option_label_building_area_unit
epl_search_widget_option_label_land_area_unit

Number range Drop down Filters

Using these filters you can adjust the drop down select options normally a range of numbers so you can increase the range to suit your requirements. These follow the same syntax.

function my_custom_range_bedrooms_min() {
	$range = array(
		'0'		=>	'Studio',
		'1'		=>	'1',
		'2'		=>	'2',
		'3'		=>	'3',
		'4'		=>	'4',
		'5'		=>	'5',
		'6'		=>	'6',
		'7'		=>	'7',
		'8'		=>	'8',
		'9'		=>	'9',
		'10'		=>	'10',
	);
	return $range;
}
add_filter( 'epl_listing_search_bed_select_min' , 'my_custom_range_bedrooms' );

Search Widget Dropdown Filters - Easy Property Listings

Search Widget Dropdown Filters

epl_listing_search_bed_select_min
epl_listing_search_bed_select_max
epl_listing_search_bath_select
epl_listing_search_rooms_select
epl_listing_search_parking_select

Price Range Filters


Price Label Filter specific to the Rental tab example

function my_custom_epl_search_placeholder($fields,$post_type) {
	foreach($fields as &$field) {

		if($field['meta_key'] == 'property_price_from') {

			if( $post_type == 'rental' )
				$field['label']	=	__('Per Week','easy-property-listings');
			else
				$field['label']	=	__('Price','easy-property-listings');
		}
	}
	return $fields;
}
add_filter( 'epl_search_widget_fields_frontend' , 'my_custom_epl_search_placeholder',10 ,2  );

Land and Building size search options

These filters let you adjust the size selection for Land and Building search.

function my_custom_listing_search_land_unit_label() {
	$imperial = array(
		'acre'			=>	'Acre',
		'hectare'		=>	'Hectare',
		'sqft'			=>	'Square Feet',
	);
	return $imperial;
}
add_filter( 'epl_listing_search_land_unit_label' , 'my_custom_listing_search_land_unit_label' );

Land and Building measurement filters

epl_listing_search_land_unit_label
epl_listing_search_building_unit_label

Other Filters

epl_property_land_area_min
epl_property_land_area_max
epl_property_building_area_min
epl_property_building_area_max