This thread is resolved. Here is a description of the problem and solution.
Problem:
You are using WPML and ACF on your website and encountering an issue where
get_fields()
in your PHP file returns FALSE when trying to retrieve fields set across different languages.
Solution:
1. If the issue occurs in the default language, disable WPML temporarily to check if the problem persists without it.
2. If the problem is in a secondary language, ensure that the pages are translated. Use the
wpml_object_id
hook to obtain the correct post ID for the translated post, which should allow you to retrieve the fields correctly. For more details on using this hook, visit https://wpml.org/wpml-hook/wpml_object_id/.
If this solution does not resolve your issue, or if it seems outdated or irrelevant to your specific case, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please contact us through our support forum.
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.