0

I am using Yoast to generate the OpenGraph meta on the following page:

https://www.wjdfund.org

If you visit that URL and view the page source, you will see the following meta tag:

That is the only og:title present in the page source, yet for some odd reason the LinkedIn Post Inspector displays the title as "— Worker Justice & Dignity Fund". Example:

https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwww.wjdfund.org

I have ruled out caching because even testing the URL with a parameter yeilds the same result: https://www.linkedin.com/post-inspector/inspect/https:%2F%2Fwww.wjdfund.org%3Flatest

The strangest part is that the "— Worker Justice & Dignity Fund" string does not even appear anywhere in the DOM, so I am baffled as to why LinkedIn is using that value. It's also worth mentioning that both Facebook and X (Twitter) display the correct title in their post previews.

Hopefully someone can shed some light on this LinkedIn issue.

2
  • 1
    The "— Worker Justice & Dignity Fund" with the mdash, according to Yoast is coming an application/json+oembed link that’s added to the head section of your page. Commented May 30 at 15:03
  • @RichDeBourke - Thank you for uncovering that! I followed the oEmbed link and was able to locate the mdash title value in the JSON file. Commented Jun 6 at 20:48

1 Answer 1

0

It turns out that WordPress core adds a application/json+oembed link to the head, and LinkedIn was using the "title" value from that JSON file instead of the og:title meta. Many thanks to @RichDeBourke for uncovering that.

I was able to disable the oEmbed link added by WordPress core by using the following PHP:

remove_action( 'wp_head', 'wp_oembed_add_discovery_links');

That removed the oEmbed link from the head and now LinkedIn is displaying the og:title value.

Not the answer you're looking for? Browse other questions tagged or ask your own question.