How to Restrict Addresses to Specific Location Types

Hi

We have out directory set up to only include the town and county in the UK.

However a recent user signed up and they have their full post code on display. Why is this please?

Have they verified on Geolocation or something.

Please advise.

Hi,

Welcome to the community. :honeybee:

Could you please let us know which map provider you are using?

If you’re using Google Maps, you can enable the Hide exact address option in HivePress > Settings > Geolocation > Address.

If needed, you can also add a custom placeholder to the location field using the following snippet [How to add custom code snippets - HivePress Help Center]:

add_filter(
	'hivepress/v1/forms/listing_update',
	function( $form ) {
		if(isset($form['fields']['location'])){
		  $form['fields']['location']['description'] = 'custom text here';
		}

		return $form;
	},
	1000
);

Hope this helps

I have checked hide exact address. Also regions fields only include city, region, county and subregion.

Thanks for the details.

Could you please let us know which map provider you’re using?

Google Maps

Thanks for the details.

Apologies for the confusion, but this isn’t possible out of the box at the moment. We do plan to add this functionality in one of the upcoming updates, though.

If needed, we can also add a temporary fix directly to your site in the meantime.

Just to clarify regarding the Hide the exact address option: it hides the house/building number while keeping the street, city, and postal code visible, since this information still represents the general area rather than the exact location.

It would also be helpful to understand how you’re using the geolocation functionality. For example, do you use the map to display listings? If so, would you like the map to show only the general city/area rather than the exact location of each listing?

Please let me know, and we’ll see what would work best for your use case.

Hey @debharrison,

I just wanted to jump in and let you know, I’ve recently released a new custom extension for HivePress that includes the ability to restrict the locations Users are able to choose from.

If you decide to check it out I’d love to hear any feedback you can offer - and, if you have any ideas to improve it, or encounter any bugs - just drop a reply in the relevant topic, and I’ll try and push an update out as soon as possible! :slight_smile:

Cheers,
Chris :victory_hand: