Language Assignment in WordPress REST API
-
I’m attempting to follow the instructions outlined in this guide https://polylang.pro/doc/rest-api/, but I’m encountering difficulties when it comes to assigning languages and translations. As my target platform is WordPress, I’m required to use ‘/?rest_route=’ before the path. How should I structure the request considering this alteration?
I’ve tried using ‘example.com/?rest_route=/wp/v2/posts/XX&lang=es’ but haven’t achieved success. Additionally, for translations, I attempted ‘example.com/?rest_route=/wp/v2/posts/YY&lang=en&translations[es]=XX’ without desired results. Could anyone provide guidance on the correct way to format these requests within the WordPress REST API?
The topic ‘Language Assignment in WordPress REST API’ is closed to new replies.