Import creating Venues but with no info other than name….
-
I’ve successfully imported my events from a CSV file, and I added the little bit of code so it creates Venues, Categories, and Tags if they’re not found.
It is creating the Venues, but it’s not connecting up the fields for the venues like address, postcode, city, etc. I’ve added those fields to my CSV file, but the Importer does not allow me to describe those fields. I tried saying they were Postmeta, but that didn’t work.
Is there a way to get the address info built into the Venue object that gets created?
If not, what’s the best approach to setting these fields? If Venues are a custom post type, then what are the names of the postmeta fields I should set with the address fields for my Venues? I’m happy to write the code to do this if it doesn’t already, but I’d appreciate any pointers you might have to get me jumpstarted, like where to hook into the flow. Maybe this should just be a standalone function that reads my CSV file and creates the Venue objects directly?
If anybody is interested, I’ve already written a PHP module to export Events and Venues from The Events Calendar by Modern Tribe, and then format it for input by this plugin’s CSV importer. You’re welcome to the code if you have a similar need….
- The topic ‘Import creating Venues but with no info other than name….’ is closed to new replies.