i have a acf group added to custom post and when i am tryying to get_fields its always return the origfnal value and didn;t get he value stored per custom post language..
Thank you for contacting us and I'd be happy to assist.
Assuming that your website already has the 'Advanced Custom Fields Multilingual (ACFML)' plugin activated.
If you're using the 'get_fields' function without passing the target post's ID, WPML should automatically filter the current post's ID, so that value from the current language post is fetched.
And if your code is passing a specific page/post's ID or needs the value from a language other than the current one, you'll need to use the 'wpml_object_id' filter, so that the correct language's page/post ID is used.
( ref: https://wpml.org/wpml-hook/wpml_object_id/ )
I hope this helps and please let me know if you need further assistance.
regards,
Waqar
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.