LinkedIn pulls title from WP’s oembed discovery links

#190580
  • Resolved Andrew Cox
    Rank Math free

    Hello! Apparently when sharing a link, LinkedIn ignores the value of og:title in the page source and instead pulls the og:title from the link that’s output by this function wp_oembed_add_discovery_links() which in our case is wrong. Is there any way to override it? Thanks.

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Rank Math only adds the Open Graph tags and does not add the oEmbed link on your site. However, you can use our handy guide to determine the plugin or theme that is adding the oEmbed link:
    https://rankmath.com/kb/check-plugin-conflicts/

    Only the site admin would know and your users won’t be affected by this troubleshooting.

    Once you have found the culprit, you can get in touch with the plugin/theme developer and ask if you can disable that on your site.

    I hope that helps. Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.

    Thanks for the response! The wp_oembed_add_discovery_links() is part of WP core. Any suggestions?

    Hello,

    Thank you for the follow-up.

    I’ve researched some functions to disable that line and found a working filter in this link.

    Could you please try this filter to remove the wp_oembed_add_discovery_links() in your page’s source code?

    remove_action( 'wp_head', 'wp_oembed_add_discovery_links', 10 );

    You can add this in the last line of your active theme’s functions.php file and this will remove the 2 oEmbed links on your site.

    I hope that helps. Thank you, and looking forward to your update.

    Thanks for the snippet. I found that as well. Do you know what the SEO impact of removing the oembed disovery links might be?

    Brian
    Rank Math free

    Hello,

    Thank you for getting back to us.

    The removal of the Oembed discovery links may have a mere impact on your SEO. There will be no significant effect on your SEO if you already have the open graph tags already set.

    Linkedin may opt to either use the open graph or the data fetched from these Oembeds that WordPress includes. However, Linkedin may prioritize on the Oembeds if both are included and their data is valid.

    However, removing those oEmbed discovery links and scripts may break a lot of other plugins that could be using them as well.

    Hope this helps. Let us know if you have any other questions.

    Thanks for the reply! That was my concern as well. Do you know of a way to filter the content in the oEmbed discovery links so that they don’t have to be removed?

    Brian
    Rank Math free

    Hello.

    Thank you for getting back to us.

    Unfortunately, we do not have a way for that at the moment. WordPress does disclaim that such filters do not be used for development purposes but only within core functionalities. Here are some reference links for that:
    https://developer.wordpress.org/reference/files/wp-includes/embed.php/
    https://developer.wordpress.org/reference/functions/_oembed_filter_feed_content/

    Please let us know if you have any other questions.
    Thank you.

    Ok. Thanks!

    Hello,

    We are glad we have addressed your concern.

    If you have any other concerns, please don’t hesitate to contact us anytime by creating a new ticket to assist you further with anything else.

    Thank you.

    Anas
    Rank Math business

    Hello,

    If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 10 replies - 1 through 10 (of 10 total)

The ticket ‘LinkedIn pulls title from WP’s oembed discovery links’ is closed to new replies.