I've created a custom post type with several custom fields with the help of WPAlchemy, and now I need to import a bunch of stuff from some CSV files.
By toying with csv import plugins, I know I can import the fields correctly in the postmeta table, but the problem is that I can't see them in both back and front end.
I managed to isolate the difference between manually inserted posts and imported posts, and it's an extra meta field (
_myprefix_meta_fields) that contains serialized stuff I don't know how to generate.
Any suggestion on how to solve the problem and correctly import the data?
UPDATE: Looking up WPAlchemy code (here) it seems that the only way to fix this is by running a script that for each post of custom type adds the extra meta field, that is just the serialization of the array containing all the metabox fields. Serializing and adding the meta field is done by using add_post_meta. I'll add myself a basic script as an answer when I'm done importing data.