Skip Navigation

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 6 replies, has 4 voices.

Last updated by Dražen 4 years, 2 months ago.

Assisted by: Dražen.

Author Posts
December 28, 2020 at 6:36 pm #7743741

anthonyB-31

Is there a way to get all related (translated) post ids from the original post through the rest api?

December 29, 2020 at 1:16 pm #7748409

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello!

Welcome to WPML Support.

I'll do my best to help you solve this issue.

1) In order to expedite handling your support requests, can you please share WPML support debug information from your site.

- To give debug information, login to your site and go to WPML → Support. From there click on the “debug information” link at the bottom of the page.
- Once on the “debug information” page, select the entire content of the text box and copy it.
- Now go back to our support forum, find debug information box and paste it.

More information on the link: https://wpml.org/faq/provide-debug-information-faster-support/

2) As I can see from some older tickets if you visit that post ID via REST API, there should be wpml_current_locale, wpml_translations showing more info about translation.

Example: hidden link

Source:
- https://wpml.org/forums/topic/how-to-get-translated-post-via-origin-post-id-through-rest/#post-3440061
- https://wpml.org/forums/topic/how-to-get-all-translated-taxonomy-terms-into-rest-api/

While I was testing this and trying to confirm on our test site, I can see this is not showing with the latest versions of WPML.

So, I will need to check on this further with our 2nd tier support, I will update you soon.

Thanks for understanding.

Kind regards,
Drazen

Screenshot_1.jpg
December 30, 2020 at 1:51 pm #7754655

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

just to update you I have escalated this case to our developers team to check and advise.

I will update you as soon as I have some news.

Thanks and kind regards,
Drazen

January 2, 2021 at 5:50 am #7765005

Sumit
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hi,

Currently, there is no way to get translated posts using the original post ID.
There is a third party plugin hidden link that enable the wpml_current_locale and wpml_translations in the REST response.

However, this seems to be a missing feature and I would kindly request you please submit this form as part of the feature request process https://wpml.org/suggest-a-new-feature-for-wpml/

Thanks

January 7, 2021 at 7:34 am #7791205

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

as our developer update you, this is a feature added by 3rd party plugin and is not currently supported by WPML out of the box.

Since we might add it in the future, I suggest you submit a feature request via the next form as it will help push it sooner:

- https://wpml.org/suggest-a-new-feature-for-wpml/

For now, you should continue using 3rd party plugin and I suggest we close this ticket.

I hope I was helpful. Don't hesitate to ask if you find any problem along the way, I'll gladly help you.

Regards,
Drazen

March 25, 2021 at 7:00 pm #8402945

itadminR

Hello,
can I please have this third party plugin? it's a hidden link and I can not find it.

March 26, 2021 at 6:29 am #8405601

Dražen
Supporter

Languages: English (English )

Timezone: Europe/Zagreb (GMT+02:00)

Hello,

sure, usually please open a new ticket as we do not reply anymore to resolved tickets.

You can find the plugin by Google-ing "WPML REST API GitHub" and it is the first link to GitHub from author shawnhooper.

Kind regards,
Drazen