This thread is resolved. Here is a description of the problem and solution.
Problem:
The client is using a headless WordPress setup and is encountering issues when trying to access translated content via the REST API. The translated content is only returned when the client is logged in as an administrator; otherwise, the default language content is served.
Solution:
1. We recommended the client to ensure that all translated pages are fully translated and published.
2. We advised checking if the second language is hidden in the WPML settings under WPML > Languages.
3. The correct approach to access translated content via the REST API is to include the language code before the REST API path. For example:
https://shiny-ukulele.sandbox.otgs.work/es/wp-json/wp/v2/pages?slug=tienda
If these steps do not resolve the issue, or if the solution seems outdated or irrelevant to your case, 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. If the problem persists, please open a new support ticket.
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.
This topic contains 3 replies, has 0 voices.
Last updated by 2 months, 3 weeks ago.
Assisted by: Dražen.