Skip Navigation

[Resolved] show the nearby producers

This support ticket is created 2 years, 2 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 2 years, 2 months ago.

Assisted by: Minesh.

Author
Posts
#2448865

Hello
I have a post "solicitudes"
Where for each post I want to show the nearby producers "productores". Producers have an address field "direccion-comercial" and the request as well "solicitud-ubicacion". But I can't use request address field "solicitud-ubicacion" as center location. It only lets me pass this data by url parameter or use the current location.
hidden link

But i need pass parameter map_center or use the current location.

Example

hidden link Kocher 5570, Ciudad de Córdoba, Provincia de Córdoba, Argentina

I need to use the field "solicitud-ubicacion" as a center to show the producers and not a parameter that can be modified.
Tks.

#2449249

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and let me check how you configured your view and let me see if I'm able to share any possible solution or workaround to set map center.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2452925

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using the map block and using the map block there is no option to set the center based on your custom field.

Even if you use classic map then you may require to pass the general_center_lat and general_center_lon:

For example:

[wpv-map-render map_id="map-9" fitbounds="off" general_center_lat="-30.34343" general_center_lon="21.3434343"]
[/wpv-map-render]

I suggest you should file a new feature request using the following form:
- https://toolset.com/home/contact-us/suggest-a-new-feature-for-toolset/

#2453017

Hello, Tks.
If I take out the map, is it possible to make a center with a custom field?

#2453051

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Sorry - do you mean that you will remove the map block and add map using the classic method?

#2453057

remove the map completely.
It is more important to use a custom field as the center and show only the closest posts.

#2453819

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using the block view but if you switch to the classic view then you can pass the address as shortcode attribute.

Please check the following related ticket:
- https://toolset.com/forums/topic/view-filter-by-distance/#post-2443923

Will you be able to create a view in classic mode and add the distance filter and filter your view by shortcode attribute. There is no way to filter a a block view using the shortcode attribute.