WordPress.org

Ready to get started?Download WordPress

Forums

CSV Importer
Custom Fields (2 posts)

  1. zaydB
    Member
    Posted 8 months ago #

    Does anyone know the format of importing custom fields from a custom post. I tried a few things out from: Having the name(not the label) of the custom field as a column, prefixing the custom field name with wpcf-custom field name as a column and also using csv_custom filed name as a column. Unfortunately none of these seemed to work. I tried to hack it by adding the custom fields to the acceptable values from an array but this didnt seem to work either. Can anyone help?

    Thanks and Regards

    http://wordpress.org/plugins/csv-importer/

  2. musicmann
    Member
    Posted 2 months ago #

    From what I understand, the "csv" prefix is for standard built-in WP fields. When this plugin encounters a column header that doesn't begin with "csv" it assumes it's a custom field and adds it as such.

    Therefore, the column heading needs to be the meta key for the custom field.

    There's no standard prefix for the meta key as different plugins use different prefixes to avoid conflicts. For example, Yoast SEO uses "_yoast_wpseo_" as their prefix. Custom fields created by the Types plugin have "wpcf-" as their prefix.

    There are a couple of ways to determine the correct meta key:
    1. Go to an entry (post, page, CPT) that has a value for the custom field that you want. Make sure the Screen Options has "Custom Fields" checked. See if there is a listing of Custom Fields Name (this is the meta key) and Value.

    2. Look for the value in the postmeta table of your database. This usually involves going into your webhosting account and using something like PHPMyAdmin to view the database directly.

Reply

You must log in to post.

About this Plugin

About this Topic