Home › Forums › ACF PRO › ACF Maps trigger on import? › Reply To: ACF Maps trigger on import?
@mercurio Place the code at the bottom of your import template in the Function Editor. More info here: https://www.wpallimport.com/documentation/custom-wordpress-export-php/
Don’t forget to update your field id, api key, and value for $address (line 3) which should just be the column name as shown in the wp all import list of data on the right side of your import template editing screen.
The acf map field with the Google Maps API generates lng and lat when an address is typed in and you click on it. So if you do not have lat and lng to import, you can use the function @kylerumble provided to accomplish this. I had some luck with this. if any problems occur check the value on line 3. That seems to be the only thing I was not clear on from @kylerumble
Thank you all for contributing! I hope that helps someone!
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.