This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
Tagged: Custom Work
This topic contains 7 replies, has 2 voices.
Last updated by incloI 1 year, 10 months ago.
Assisted by: Long Nguyen.
Author | Posts |
---|---|
June 21, 2023 at 7:29 pm | |
incloI |
Hello! I am using WPML on our staging site and none of my ACF custom fields that are assigned to specific pages are showing up in the second language. I am assuming this is a setting i have missed but I can't figure out what |
June 21, 2023 at 8:08 pm | |
June 22, 2023 at 4:05 am #13872457 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi there, Thank you for contacting WPML support, I'd be happy to help you with this issue. I see the issue happens from this page hidden link That means the page with the slug "crowd-control-weapons" will use this template to display content on the frontend, if not the page will display the default or another template. I would like to inform you that helping you with custom code, is out of the scope of WPML, but I can help you to point you to the source of the problem you are having. Look forward to your reply. |
June 22, 2023 at 7:41 am #13873361 | |
incloI |
Hi there, Thanks for the reply. So just to understand the issue: WPML does not support using custom WordPress template files to show different page layouts when using ACF? Are there any settings that would work around this in the plugin? Thanks, |
June 22, 2023 at 8:12 am #13873695 | |
incloI |
Sorry one more thing, changing the permalink for the child pages under crowd-control-weapons does not fix the issue. I tried the workaround here: https://wpml.org/errata/setting-an-acf-field-to-display-based-on-parent-page-does-not-work-for-translated-posts/ This also did not work for me. |
June 22, 2023 at 9:57 am #13875317 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Yes, WPML supports displaying translated ACF field values in a custom WordPress template as you can see on this page hidden link Please try to replicate the issue with minimal steps and data, don't restore the backup file there. Thanks for your co-operation. |
June 22, 2023 at 11:13 am #13875769 | |
incloI |
Hi, I am trying to set it up in the sandbox but it there was an error when I tried to install Advanced Custom Fields Multilingual plugin. That is required to make this work right? Thanks, |
June 23, 2023 at 3:04 am #13881499 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, Yes, you should use the plugin Advanced Custom Fields Multilingual to make this work. Now I do not see any errors there. I found an easy way to fix this issue: Just add the template name to the template file "page-crowd-control-weapons.php", instead of using the page slug template /* Template Name: Example Template */ Then you can select the template for the page in English language, it is synced to Spanish then, please check this screenshot hidden link Refer documentation https://developer.wordpress.org/themes/template-files-section/page-template-files/#creating-custom-page-templates-for-global-use Look forward to your reply. |