Description
Advanced Custom Fields Multilingual Guide
Overview
Advanced Custom Fields (ACF) simplifies adding custom field values to posts, making it easy to manage multilingual sites. This guide provides instructions for a successful multilingual ACF setup.
Integrating ACF with WPML
The WPML plugin works well with ACF, ensuring your multilingual site runs smoothly. Follow these guidelines and recommendations:
- Enable Field Group Translation
- Before creating a field group, enable the “Field Groups” post type for translation via WPML -> Translation Management.
- Ensure the “Fields” option is set to “Do nothing” to avoid conflicts.
- Translate Field Groups
- Each language requires its own version of a field group. Create your field group in the default language, then use the ‘Duplicate’ tool to create a copy in the new language.
- Edit the field’s label and settings, but keep the field’s name consistent across all translations. ACF uses the field’s name to store data.
- Editing a Post
- Only relevant language field groups will load when editing a post.
- To translate a post, use the ‘Duplicate’ tool and click the ‘Translate Independently’ button to prevent the translated post’s custom fields from being modified by the original post.
- Avoid Data Loss
- WPML displays a metabox with a list of all custom fields and options to ‘Translate’ or ‘Copy’ the data.
- The ‘Copy’ setting will overwrite the translated post’s value with the original post’s value upon update. This setting does not change to ‘Translate’ after saving, so ACF cannot store a unique value for the translated post.
- The ‘Translate’ setting allows ACF to store custom field data effectively.
- Skip underscore fields like ‘_image’ and leave them as ‘Translate’ because each field is different for every translation.
Conclusion
By following these guidelines, you can ensure that ACF integrates smoothly with WPML, allowing you to manage custom fields effectively across multiple languages on your WordPress site.
Reviews
There are no reviews yet