I’m looking for a function I can use in the process of bulk posting business data I have in another MySQL table in my WP database.
Config: I have the WPGD plugin as well as the MultiLocation addon.
I have a MySQL table (call it “schools”) that contains listings for many Brazilian Jiu Jitsu academies. This table gets updated with new academies daily. I’ve hit a snag in the process between taking the data from this schools table and getting it processed correctly by the GD plugins.
What I would like is a php function that accepts an associative array of location data and publishes new Places posts using it. I’ve become overwhelmed with the number of functions in the GD code and am not sure what all needs to be called, and with what data, in order to publish a post.
My schools table has the following information to provide as GD posts:
1) business ID (with a corresponding custom field on GD posts)
2) Name
3) Phone
4) Street Address
5) City
6) State / Region
7) Zip
8) Country (as 2-character ISO code, not proper country name)
9) Latitude (only populated for some entries)
10) Longitude (only populated for some entries)