Importing from Google Sheets and trying to populate an ACF Google Maps field

Closed
ImportWP Pro - WordPress XML & CSV Importer ImportWP Pro - WordPress XML & CSV Importer November 04, 2020
Login to reply
Ben Thomas
2 weeks ago

Hi James.

Great, thank you.

Best,

Ben

James Collings Support Agent
2 weeks ago

if you click on the enable fields button, and select the post_status field, setting this to publish should do the trick.

By default it uses the wordpress default post_status

James

Ben Thomas
2 weeks ago

Hi James.

Apologies for the late reply.

Thank you for taking the time to make that update, much appreciated.

I ended up using the lat lng values in a ACF text field instead as the job was time sensitive.

Can I ask something else, I'm converting the sheets rows into posts, is there way to keep the articles published when you run an update, they all seem to go back to draft mode?

Thanks,

Ben

James Collings Support Agent
3 weeks ago

Hi Ben,

I have just added a new release onto github, https://github.com/jcollings/importwp-advanced-custom-fields/releases/tag/2.0.4 this allows you to import google maps fields, you need to set the value in the field as follows (seperating each bit of data with a pipe "|"):

Address|lat|lng|zoom

You do not need all the data, e.g.

Address|lat|lng

In my test csv file i set the field value to:

{0}|{1}|{2}|{3}

Let me know how you get on.

James

Ben Thomas
3 weeks ago

Hi James.

Great, thanks for letting me know, I see that has worked.

Regarding the Map, I do have the lat and lng values as well as the address in the sheets file.

Thanks,

Ben

James Collings Support Agent
3 weeks ago

Hi Ben,

I will look into the acf map field, is it just the address you have or do you also have the lat and lng?

When running an importer manually it will always use the same file that was attached when created, to download a new file from google sheets you need to Click on the select file tab/step and download a new one. (when running on a schedule new files are automatically downloaded before being run)

James

Ben Thomas
3 weeks ago

Also, I added a new row to Google Sheets and run the import again and it doesn't seem to be registering it (i.e. it doesn't create a new post).

Do you have to create a new importer every time the sheets file is populated?

Thanks,

Ben

Ben Thomas
3 weeks ago

Hi.

I'm trying to take a column from Google Sheets containing address' and put them into a ACF Google Map field but it doesn't seem to be populating the field, please see attached for reference.

Is there anyway to solve this?

Great plugin by the way.

Thanks,

Ben