Skip Navigation

[Closed] Using Toolset Address field with FacetWP

This support ticket is created 3 years, 6 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Karachi (GMT+05:00)

This topic contains 3 replies, has 2 voices.

Last updated by Waqar 3 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#2075295

Tell us what you are trying to do?
Hi. I'm trying to use a FacetWP proximity facet to filter posts based on the address stored from a Toolset address field. It appears that the facet isn't seeing the stored coordinates. I looked in the database and it appears the coords are stored in an interesting way... I checked with FacetWP support and they said if I can find out how the data is stored I can use an indexer hook to tell FacetWP how to index the lat and long.

Is there any documentation that you are following?
No

Is there a similar example that we can see?
Yes, but would prefer to keep private.

What is the link to your site?
Would prefer to keep private during development.

#2075645

Hi,

Thank you for contacting us and I'd be happy to assist.

If your goal is to get the raw latitude and longitude values from the Toolset's address type custom field, you can use the Toolset Types API:
https://toolset.com/documentation/customizing-sites-using-php/functions/#address

For example, suppose that you need a comma-separated latitude and longitude value from the address field with slug 'post-location', from post with ID "123".

The "types_render_field" function, in this case, will be used as:


$field_value = types_render_field( 'post-location', array( 'item' => 123, 'format' => 'FIELD_LATITUDE,FIELD_LONGITUDE' ) );

I hope this helps and please let me know if you need any further assistance around this.

regards,
Waqar

#2078129

Hi Waqar,

I'm still trying to make sense of this, have not solved the problem, and am only replying on a Saturday because your "cleanup robot" prompted me to do so... Please don't close this ticket yet.

Thanks,
Eric

#2079175

Hi Eric,

This ticket will remain open for a couple of weeks, so you're welcome to share any follow-up questions or concerns.

regards,
Waqar

The topic ‘[Closed] Using Toolset Address field with FacetWP’ is closed to new replies.