Aller au contenu
Menu Documentation
WP connect > Documentation Air WP Sync > How to use Meta Box with Air WP Sync?

Comment utiliser Meta Box avec Air WP Sync ?

Air WP Sync is a powerful tool for importing data from Airtable into WordPress. While it is not yet fully compatible with all Meta Box Lite field types, it is possible to use Air WP Sync with Meta Box Lite by leveraging custom fields and ensuring the field types match.

Step 1: Setting Up Meta Box Custom Fields or Custom Post Types

Before synchronizing data, you need to create custom fields and, if necessary, Custom Post Types (CPTs) in Meta Box Lite, assign these custom fields to posts or CPTs and make sure you use appropriate field types for these custom fields. Air WP Sync maps data based on these types.

To create custom fields:

  1. Aller à Meta Box > Custom Fields et cliquez sur Add New Field Group bouton.
  2. Add a title to your field group.
  3. Cliquez ensuite sur + Add Field button in the Fields tabulation.
  4. Select a field type in the list (or search it).
  5. Click next to the field name to define its parameters: at the very least, you must assign it a Label and an ID.
  6. Dans le cadre de la Paramètres tab, at least, assign its Location to Post, Page or/and CPT.
  7. Cliquez sur Publish button to save this field group and its custom fields.

For more information, see the Meta Box documentation on creating field groups and custom fields.

📌 Note that the ID (slug) is automatically filled in when the Label is entered, but it is entirely possible to modify the ID. Don’t forget the ID, which you’ll use for mapping.

⚠️ Air WP Sync doesn’t support all the custom field types offered by Meta Box. Here’s the list of supported fields.

To create a custom post type:

  • Aller à Meta Box > Post Types et cliquez sur Add New Post Type bouton.
    Dans le cadre de la Général tab, set a Plural name and a Singular name for your post type. The slug is automaticaly filled in, but you can of course modify it.
  • Enable the basic WordPress fields in the Supports tabulation.
  • Enable the features and taxonomies you need for the post type, in the Caractéristiques et Taxonomies tabs.
  • Cliquez sur l'icône Publish button to create the CPT.

For more information, see the Meta Box documentation on creating custom post types and taxonomies.

⚠️ If you’ve created your CPT after your custom fields, don’t forget to add this CPT to the Location of field groups.

Step 2: Importing with Air WP Sync to Meta Box Field

Once your Meta Box custom fields or CPTs are ready, set up your Air WP Sync connection to import your Airtable data correctly.

  1. Aller à Air WP Sync > Toutes les connexions.
  2. Cliquez sur Add New Connection button to create a new connection.
  3. Give a title to your connection.
  4. Dans le cadre de la Airtable Settings section, fill your Airtable access token in the Access Token domaine.
  5. And select your Airtable Base, Tableet Voir (optional) linked to your access token.

Setting Up Your Import

Dans le cadre de la Import As… section:

  • Dans le cadre de la Importer en tant que drop-down, select Article.
  • Dans le cadre de la Type de publication drop-down, select Article, Page or the Meta Box post type created before.

Field Mapping

Dans le cadre de la Field Mapping section:

  • Choose an Airtable field: in the Airtable Field side, select your Airtable fields from the drop-down menu.
  • Select a WordPress field, in the Importer en tant que drop-down menu:
    • Select basic WordPress fields such as Title, Slug, Category, Featured Image, Taxonomy.
    • Or select Custom Field to map with the Meta Box custom field, and type the ID (slug) of Meta Box custom field.

⚠️ Ensure that the field types in Airtable match the types of the Meta Box custom fields.

Import and Sync

Once all your connection settings are done:

  1. Cliquez sur l'icône Publish button in the top-right of the connection.
  2. Cliquez sur l'icône Synchroniser maintenant button in the Actions section of your connection to import and sync all your Airtable base content into yours posts or your new custom post types.

Step 3: Viewing the Imported Data

After the import is complete, you can check how the data appears inside your posts, pages or Meta Box-powered Custom Post Types. For the Meta Box CPT:

  1. Aller à WordPress > Meta Box Post Type and open the imported post type.
  2. Open a post to verify that all mapped custom fields have been correctly imported.
  3. If you use Elementor or Gutenberg, you can display the Meta Box custom fields dynamically on the front end.

Supported Meta Box Fields

Air WP Sync currently supports mapping the following Meta Box field types:

Meta Box Field TypeAirtable Compatible Data Type
TexteTexte sur une seule ligne
TextareaTexte long
CourrielTexte sur une seule ligne
URL / OembedURL – Single line text
WYSIWYG EditorLong text (formatted in HTML)
enable rich text formatting
Single ImageAttachment (single file)
Checkbox – SwitchSingle select – Single line text
Sélectionner – Select AdvancedSélection unique
RadioSélection unique
Nombre Nombre
Date PickerDate
SliderNombre

These fields will sync seamlessly if the Airtable field type matches the expected Meta Box field type.

Unsupported Meta Box Fields

Currently, Air WP Sync does not support mapping the following Meta Box fields:

  • Checkbox list
  • Autocomplete
  • Background
  • Bouton
  • Button Group
  • Color Picker
  • Custom HTML
  • Datetime Picker
  • Fieldset Text
  • Google Maps
  • Hidden
  • Icon
  • Image Select
  • Key Value
  • Open Street Maps
  • Mot de passe
  • Text list
  • Time Picker
  • Range
  • Article
  • Sidebar
  • Taxonomy
  • Taxonomy Advanced
  • User
  • File, File Advanced, File Input, File Upload
  • Image, Image Advanced, Image Upload
  • Vidéo
  • Divider
  • Heading

If your project requires one of these fields or not listed in supported fields, consider using an alternative field type that is supported.

Need Help?

By following these steps, you can seamlessly sync your Airtable data with Meta Box custom fields using the Air WP Sync plugin. This integration keeps your data consistently updated and centrally managed, ensuring efficiency and accuracy.

If you encounter any issues or have questions, feel free to reach out to our support team for assistance. You can also check our full documentation or the other Articles avancés.

Happy syncing!

fr_FR