Populate database

HomeForumsPre-Sales QuestionsPopulate database

Tagged: 

Viewing 1 reply thread
  • Author
    Posts
    • #1152
      Fred King
      Participant

      I have the plugin and bought the Custom Fields and Customizer add-ons from your site. Do you have any guidelines or information on how I might populate the database using a CSV file from an already established family listing that has over 200 members? (which might give reference to the SQL table column heads, etc.). Some are obvious like post_name, post_type, but I’m not sure about some of the other ones. I have already I added a couple of members and some custom fields. Then looked at the database using phpMyAdmin, but couldn’t determine the best path. Thanks for any guidelines or help you can provide.

    • #1159
      Stephen Sherrard
      Keymaster

      Hi Fred,

      Sorry for the delay… email notification must have gone to spam folder.

      You may want to search WordPress.org for plugins that can import/export data for Custom Post Types. I know there are a few out there, but I haven’t personally tried any of them.

      My plugin doesn’t create any new database tables. Instead, it creates a custom post type called “member”, and all the additional info for each member (contact info, and custom fields) are store as post meta fields.

      So, you would need to find something that can take info from your CSV and first create a “member” post type, and then map each column from your CSV data to a specific post meta key. You would have to search through my code to find the post meta keys, but they are usually prefixed by “_pta_member_directory_” and then the name of the field, such as “_pta_member_directory_email”.

      I’d have to look through my code for the custom fields plugins to confirm, but I’m pretty sure I stayed with the same prefix and then the slug version of whatever name you gave to the custom field you created. Although, things like links are split into two custom fields, one for the title and one for the url.

      So, the short answer is I’m not sure there is any easy way to do this. If you can find a plugin that can do the mapping for you, it would certainly be easier, but you need to figure out the meta keys for all the fields you want to transfer over.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.