Gato GraphQL + Polylang demo

Automatically synchronizing translations for a post's featured image for Polylang

Synchronize the featured image across all translations for a post, for all languages defined in the Polylang settings, using a Gato GraphQL automation.

Leonardo Losoviz
Leonardo Losoviz -
Gato GraphQL logo
Image
Target Image

Integrations

This demo is a continuation of Automatically synchronizing translations for a post's tags and categories for Polylang, to also synchronize the translations for the post's featured image (in addition to translating the content, tags and categories).

It uses the integration with the Polylang plugin (and Polylang PRO).

In the demo video, Polylang is configured with 3 languages: English (set as the default), Spanish and French, and we have a post that has alredy been translated to all three languages (following the previous demo).

We edit the post in English, and assign a featured image. We then execute persisted query Sync featured image for Polylang (already available by the Gato GraphQL plugin).

The media item doesn't yet have translations for either Spanish or French, then those translation posts will still use the original image in English.

When adding a translation for Spanish for the image, and executing the persisted GraphQL query again, the Spanish post will then be set with that corresponding image.

Finally we automate the process. By publishing automation rule Polylang: When publishing a post, set the featured image for each language on all translation posts, whenever the origin post in English is updated, the featured image will be automatically synchronized for all translation posts.

We then add a translation for French for that image, and update the origin post in English. As a result, the post in French will now have the corresponding featured image in French.

When the featured image is removed from the post in English, it will be likewise removed from all translation posts, guaranteeing that all posts are synchronized.


Want more demo videos?

Receive timely updates as we keep improving Gato GraphQL.

No spam. You can unsubscribe at any time.