Creating custom map with multiple points, manageable by Wordpress

Asked

Viewed 451 times

0

You know how to generate a json file in wordpress?.

I’m trying to create a map where custom points are manageable by Wordpress, I’m using the plugin ACF Advanced Custom Fields, where you create a custom map field and can print, if you like, longitude and latitude.

I was basing myself on this tutorial Creating a map with custom points in Google Maps, what I don’t know is generating the json file containing only this information I want, I saw that has something called REST API, which generates json by url.

The question is how to filter it. Someone there has managed to understand what I need and could help me?

UPDATE I was able to do, I even solved the problem of grouping statements proxímos, if by chance someone has a problem like this, send me an email and I send the whole project already ready.

E-mail: [email protected]

  • I would suggest that you make a loop to read the values of the fields and write them in JSON in the file that would be read according to the tutorial. The REST API you mentioned is something else. It is a plugin capable of turning WP into an API with the existing data in the tool. If useful in any way, there is the plugin ACF to REST that takes the data of your custom Fields and makes them available from the WP REST API

  • I am kind of layman rss, but from what I understood this way that you said it would be static, since I would need to put the values in hand, and these values should come from the database,

  • Dynamically, really. Take a look here at the documentation of ACF. You take the values of the fields from the database and manipulate them with php to create the file with the JSON content. There is also that plugin that can solve your problem in a simpler way.

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.