Skip Navigation

[Resolved] Importing addresses to address field

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.

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 1 year, 11 months ago.

Author
Posts
#2644933

Tell us what you are trying to do?
I am importing some custom posts with addresses from a CSV file. The information is imported correctly but the posts do not appear in a view that contains a map. Until you enter the imported posts and click the update button, they do not appear even though you have not changed anything and the fields were already informed with the import data. There are 1300 posts so we cannot go in one by one and force their update, so I need some way to force a massive update or that they work initially with the import.

What is the link to your site?
hidden link

#2645117

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+01:00)

Hi there

The cache needs to be populated with the addresses, getting the lat and lon from the Google (or Microsoft) maps API.

That will happen automatically if the locations are displayed as markers on a map.

To do that in bulk you can make a test page where you add a View that queries the posts with the address fields, and add a Map block to display them as markers on a map, using the View as source. (See https://toolset.com/course-lesson/displaying-a-list-of-posts-on-a-map/)

You can try displaying all of them at once, but 1300 posts is quite a lot, so maybe add pagination to the View, displaying—say—100 posts at a time, and then paginate through the 13 pages of results. By the time you get to the end the address cache should have been populated, so that the locations can then be found by searches etc.