- Status
- Resolved
- Resolved in
- 1.9.0
- Related plugin/theme
- Advanced Custom Fields (ACF)
Overview of the issue
When you create an ACF Options Page and specify the post_id for this page in a way similar to this:
acf_add_options_page([
'page_title' => __('Portfolio options', 'my-theme'),
'post_id' => 'portfolio',
'parent_slug' => 'edit.php?post_type=my_portfolio',
]);
You will not be able to translate this options page with WPML. The translation will always be copied to other languages (will overwrite the default language).
Workaround
You should not specify post_id. Your code to register ACF Options Page should look like this:
acf_add_options_page([
'page_title' => __('Portfolio options', 'my-theme'),
'parent_slug' => 'edit.php?post_type=my_portfolio',
]);
Please keep in mind if you are updating code for the already existing options page with some entries in the fields you will have to provide entries again (updating the code will deregister your options page and register it again).