Lifetime Licenses Are Ending Soon, Get Yours Before They're Gone
 - 
Read More
Lifetime Licenses Are Ending Soon, Get Yours Before They're Gone
 - 
Read More
Pricing

You may have seen some references on our site to annual licensing or renewals.

All plugins currently come with a lifetime license, no matter what the site says.

We’re currently running tests before we make the switch to annual pricing. Check the Discounts tab to purchase our other plugins and get a lifetime license before they’re gone.

I Understand I Have a Lifetime License
Now is your last chance to buy a lifetime license before we switch to annual pricing. Existing licenses will be unaffected.
Read More

How to Map Custom Fields

Mapping is used when the value you need to import to your site differs from the value in your file. A visual interface is available for mapping Custom Fields and custom taxonomies. To map elsewhere, you can use a custom PHP function.

Mapping Custom Fields

For example, you may have a file with product categories that are written in Dutch, but you want to import these products to categories that already exist on your site with English names.

Or, your theme or plugin requires the value of a Custom Field it uses to be either 1 or 0, but in your XML or CSV file, the values are expressed as Yes or No.

You need to map the values in your file to the values you want imported to your site.

Example – Mapping For A Dropdown

In the previous article, Importing to Theme & Plugin Fields, we explained how to detect the fields used by your theme or plugins, and their possible values.

Our theme has a dropdown to specify whether a Property Listing is for rent or for sale.

Rent or Buy Example

The field name is rob_value, and the possible values, as stored in the database, are Rent and Buy.

Custom Fields Existing Values

Note: You can see the values as they are stored in the database by clicking inside the Value textbox for the rob_value field in WP All Import. The values stored in the database may not be the same as the values shown inside the select box in the theme. We must map the values as they are stored in the database.

Our XML file has a <rentorbuy> element that is set to FORSALE if the property is for sale (Buy), and FORRENT if the property is for rent (Rent).

XML Data

Without mapping, simply dragging & dropping <rentorbuy> to the Value box for rob_value would not work because the value of <rentorbuy> is not correct for our theme.

To solve this problem, we use the Mapping feature.

Map Custom Fields Example

Click Field Options… and then click Mapping.

A dialog box will pop up, allowing you to specify the mapping rules.

Mapping Box Values

Now, when the import is run, FORSALE in your file will be translated to Buy, and FORRENT in your file will be translated to Rent, so your data will be imported correctly, as per the requirements of your theme and plugins.

Mapping Function Example

If you need to map using a PHP function elsewhere, we have an example available to share:

// Mapping function
function my_map_field( $data ) {
    $map = array(
            'Translate This' => 'To This New Value',
            'And this' => 'To this',
            'Add as many' => 'Rules',
            'As you need' => 'In this array',
        );

    return isset( $map[$data] ) ? $map[$data] : $data;
}

Learn more about using PHP functions here: Calling PHP Functions In Your Import Configuration.

Related Docs

Learn how to use custom fields when importing via WP All Import.

Learn more about serialization and importing serialized fields.

Provides instructions on how to run PHP code during the import.

The best import export plugin for WordPress & WooCommerce.

Complete, granular control of your data with an easy to use drag & drop interface.
  • 90 Day Money Back Guarantee
  • Unlimited Installs
  • Lifetime Licence
  • Fast, World-Class Support
Get Started
90 Day Money Back Guarantee

Lifetime support. Lifetime updates. Pay once.

Packages
Standalone
Import
Pro Package
$299
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Pro Package
$399
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
WooCommerce Import Package
$199
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Standalone
$169
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Export Standalone
$99
one-time
  • Import Pro
Import Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
  • Export Pro
Export Add-Ons
  • Woo
  • ACF
  • Meta Box
  • JetEngine
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee

Lifetime support. Lifetime updates. Pay once.

Import
Pro Package
$199
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Import + Export Pro Package
$299
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
Export
Pro Package
$199
one-time
  • Import Pro
Import Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
  • Types
  • Export Pro
Export Add-Ons
  • WooCo
  • ACF
  • Gravity Forms
  • Users
Add to Cart
90 Day Money Back Guarantee
cross