Hi,
Whilst this doesn’t exactly answer your question it might be of use to others looking at mass import options and perhaps you if you find no other solution. I could find no way to assign categories in the data. But I could add an id to the html which enabled them to be marked up in 20’s which saved a lot of time…
Just thought I’d share my experience uploading and managing mass uploads of placemarks with lots of categories just in case anyone else is assigned the fun challenge of uploading thousands of them and wishes to keep things as simple as possible.
This is an extension of an earlier post I found very useful but with a couple of changes so that you can also assign featured images (placemark icons) in the data and assign categories quicker manually (there’s no way I could find to do this by including it in the data). It’s not ideal but the best we could manage with our level of skill and this plugin. Okay, let’s begin:
It’s a six step process.
1) In order for your maps to load quickly you should think about categories for your placemarks carefully. Basically you only want to load what you need by calling categories in the shortcode. Hundreds of placemarks are okay. Thousands are a problem.
To speed up assigning categories manually later on we included a unique identifier for each category in the HTML in column csv_post_post (see below). We wrapped the identifier(s) in a div with a class and then added display:none to that class in CSS (so it isn’t visible). You don’t need to do this but it made our lives easier because of the number of placemarks and categories we had.
2) Format Data – Your placemark data needs to be in CSV format (use excel, comma delimited) with the following column titles:
csv_post_title – in this column you put your placemark title
bgmp_address – in this column put coordinates or fuzzy address
csv_post_post – here you put the text/html for placemark
csv_post_type – enter “bgmp” for all cells (no quotation marks)
csv_attachment_thumbnail – enter the URL for the map-marker image (what will be featured image)
You will need to split the file if it’s large to maximum of around five hundred markers in each. Remember to save each one as CSV and include the column headings exactly as they are above or else it won’t work.
3) Get the right plugin – you need to download the forked version of CSV Importer plugin at GitHub and then upload it to WP/activate it.
4) Upload Data – upload your data file(s) by going to TOOLS then CSV IMPORTER. Tick import posts as drafts. Select the first file and upload. Repeat until all data is uploaded as drafts. If you don’t import them as drafts at this stage you will get into a mess later on.
5) You should now have all your hundreds or thousands of map markers as drafts with no categories assigned. You assign categories manually in batches of twenty. You do this by selecting all DRAFTS and then searching by your first category ID set in stage 1. The search will return however many there are in the data set containing that ID. Select all twenty on the first page with the tick box at the top. Then select EDIT from BULK ACTIONS and then APPLY. You can then assign the correct category to the twenty selected placemarks and hit UPDATE. Move onto the next page and repeat until all done. Then do the next category etc.
If you didn’t assign category ID’s in the HTML then you will need to assign categories manually one at a time. Enjoy that one. Probably easiest to do this when you do the final step.
6) You should now have all map markers as drafts with categories assigned. Now you need to publish each one individually (unfortunately). Open it and hit publish. I do twenty right clicks, opening them as new tabs. Using BULK ACTIONS and changing the status to PUBLISHED for twenty doesn’t work as the addresses don’t get geocoded. Nor does the QUICK EDIT select PUBLISH. In both these cases the post will be published but it will not be visible on maps and then you will be in a mess. You need to physically open each one and hit publish for the address to geocode.
That should save you a lot of time.
And please, if anyone finds a way to assign categories in the CSV file, let us know.