29 Jul 2020

Linkedin not respecting open-graph tags

I had an issue with the LinkedIn post inspector displaying the words footer-text within the snippet. It turns out that the og:title was not respected at LinkedIn. The problem was WordPress itself - not LinkedIn.

Disable the WP Rest API, and you are good to go. The contents of the oembed+json link that is embedded in the wp_head() creates the issue with the "title" being set to "id".

 

I achieved this by installing the Disable WP Rest API plugin for WordPress. This solved the problem and Linkedin displayed the posts as expected.