Support » Plugin: qTranslate X » Shortcode tag showing when sharing to Linkedin

  • Heelo qTranslate-x team,

    I’ve been using the plugin to offer multi-language support of my website. Works like a charm when visiting it like a normal user.

    Problems occur when trying to share my website on Linkedin, after configuring Yoast SEO plugin to manually set title and description tags. When sharing to Facebook, The title and description tags I set in the Yoast Plugin (Bulk editor section) work. When sharing my home url ( ) to Linkedin ( without /language suffix i.e /en or /fr ), Linkedin opengraph grabber detects only the title. When I type url with language I get nothing, just the shortcodes displayed as title of the page like this [:en]Home[:fr]Accueil[:] , and nothing being displayed in the description.
    Tried a dumb URL (adding ?suffix at the end) to trick Linkedin but I got the same result. Any ideas?

    • This topic was modified 2 years, 5 months ago by  azizfcb. Reason: formatting
Viewing 4 replies - 1 through 4 (of 4 total)
  • Did you have any luck with this? I have the same issue.

    Short of solved. I have my website in two different languages, French 20% and English 80% user base ( approximately ). What I exactly did is to sacrifice French for English when Sharing URLs to Linkedin, and only then. Linkedin ignore the page’s title/description that you put using YOAST plugin and only cares about the normal titles field that show up when you start editing/posting stuff, normally. I decided to set the title of the page ( or Article ) to be the same in both version. and No more shortcode showing. Hope you found this useful. If this isn’t clear I would be happy to explain it further.

    Thank you @azizfcb

    I actually do need both titles to work. Strange how Facebook, Google and others do show it correctly, and only liked in shows the shortcode. Actually if we put the share on linkedin button from the website, it shares it correctly, but if you copy paste the URL to linked in directly, it breaks!

    I hope the devs have something to add.

    It’s because the oembed content is overriding the og tags. The problem is in the wordpress core function get_oembed_response_data in wp-includes/embed.php

    The function outputs the title using $post->post_title. This is a problem when the titles use special tags, like qTranslate does. The function should use apply_filters(‘the_title’,$post->post_title) instead. This fixes the problem.

    This function is not pluggable, so my understanding is that we can’t override it in our theme functions. And of course you can’t make changes to the wordpress core files, since all changes would be lost with the next update.

    I have created a ticket about this, so let’s hope they fix this issue.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Shortcode tag showing when sharing to Linkedin’ is closed to new replies.