Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting Latitude and Longitude from a post #79

Open
DevinFahnestock opened this issue May 25, 2023 · 1 comment
Open

Getting Latitude and Longitude from a post #79

DevinFahnestock opened this issue May 25, 2023 · 1 comment

Comments

@DevinFahnestock
Copy link

DevinFahnestock commented May 25, 2023

Hey,
I have a post with a location on it. I can see the lat and long in the post, but how do I get those values using the post id in the backend?

Could we add a way to get those fields?
Thanks

@airplanenoise
Copy link

depends on what you are trying to do, but if you are just trying to display them on a post, one way you can do that is using Single Location (a core extension), with a shortcode like this:

[gmw_single_location object="post" object_id="10513" address_fields="lat" elements="address"]
[gmw_single_location object="post" object_id="10513" address_fields="lng" elements="address"]

i am guessing there is a way to get it from the actual values via PHP, too.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants