I am using Yoast to generate the OpenGraph meta on the following page:
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.
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.