How to latitude and longitude fields to add property form

How to latitude and longitude fields to add property form. host should be able to manually enter latitude and longitude information

Please try this PHP snippet, but please note that it can require further customization.

add_filter(
	'hivepress/v1/fields/latitude',
	function($args, $field){
		if(in_array(hivepress()->router->get_current_route_name(), ['listing_submit_details_page', 'listing_edit_page'])){
			$args['label'] = 'Latitude';
			$args['display_type'] = 'number';
		}
		
		return $args;
	},
	1000,
	2
);

add_filter(
	'hivepress/v1/fields/longitude',
	function($args, $field){
		if(in_array(hivepress()->router->get_current_route_name(), ['listing_submit_details_page', 'listing_edit_page'])){
			$args['label'] = 'Longitude';
			$args['display_type'] = 'number';
		}
		
		return $args;
	},
	1000,
	2
);

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.