# LinkedIn Share Post: Translate oEmbed WP URL

Data used by LinkedIn is not being fetched from the page title attribute but from the WP oEmbed data to be rendered in the LinkedIn preview.

![](/files/-MdGvCdi4QV5qk5Z5Irt)

With the filter below you can translate the oEmbed url :

```
function rb_weglot_localise_oembed_url($html) {
   $search = '/wp-json/oembed';
   $current_language = weglot_get_current_language();
   $default_language = weglot_get_original_language();
   if ($current_language !== $default_language) {
      $html = str_replace($search, "/$current_language/wp-json/oembed", $html);
   }
   return $html;
}
add_filter('weglot_html_treat_page', 'rb_weglot_localise_oembed_url');
```

�Once done, you can check the preview on LinkedIn using <https://www.linkedin.com/post-inspector/>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://developers.weglot.com/wordpress/use-cases/linkedin-share-post-translate-oembed-wp-url.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
