Geolocation For Requests

Is it possible to add geolocation to requests?

Yes, please make sure that you have the latest version of the HivePress Geolocation extension. Also, please check if Requests are added in the setting Content Types in HivePress/Settings/Geolocation section.

Thanks yevhen.
In a previous post you published the code to put in the sidebar the search map as one of the filter options but for ads.

add_filter(
	'hivepress/v1/models/listing/attributes',
	function( $attributes ) {
		if ( isset( $attributes['location'] ) ) {
			$attributes['location'] = array_merge($attributes['location'], ['searchable' => false, 'filterable' => true]);
			$attributes['latitude'] = array_merge($attributes['latitude'], ['searchable' => false, 'filterable' => true]);
			$attributes['longitude'] = array_merge($attributes['longitude'], ['searchable' => false, 'filterable' => true]);
		}

		return $attributes;
	},
	1000
);

Is it possible to put it also for applications?

Gracias yevhen.
En un post anterior publicasteis el codigo para poner en la barra lateral el mapa de busqueda como una de las opciones de filtro pero para los anuncios.
Somo se puede poner tambien para las solicitudes?

This is good news thank you. I just updated the content types in the geolocation tab and changed to vendors (not their services) and requests! Thank you Hivepress

If you mean adding Geolocation for requests the code snippet is not required anymore. Please make sure that you have the latest version of the HivePress Geolocation extension. Also, please check if Requests are added in the setting Content Types in HivePress/Settings/Geolocation section.

So I have it configured but I need it to appear in the filter side column where the map and the distance search radius appear…

If there is at least one request with a set location then the map will appear in filter form. Also if you do search by location on requests page then radius filter will appear

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