Link WordPress Translations
wordpress_link_translationsConnects pages or posts on a multilingual WordPress site as TRANSLATIONS OF EACH OTHER (Polylang translation group). translations maps language code to post id, e.g. {"tr": 120, "de": 340, "ru": 341} — at least two entries.
Publishing the translated pages is not enough on its own: without this link the language switcher does not offer the new languages and no hreflang tags are generated, so Google treats the pages as unrelated documents and the translated versions compete instead of supporting each other. Every language you pass must already be registered (wordpress_languages action='add' first) — Polylang ignores an unknown language without complaining, which is exactly how a page ends up with no language. A post that has no language yet is pinned to the language you gave it here. The reply returns each page's language and permalink so you can confirm the group is real.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| site_url | No | ||
| translations | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||