How do I disable automatic og:image tag on my posts?

Posted in: Newspaper
Post count: 30

Hello, I am getting multiple og:image tags on my post because the theme automatically includes it. How do I disable the automatic insert of og:image so that it doesn’t conflict with my other social network tags?

Thanks!

Post count: 23312

Hello danoah,

If you want to affect the og image meta property, you should check the theme’s core files and remove from there the codes which call these properties, like from here -> https://www.screencast.com/t/nTde1SGwJid Also, please notice that for many settings, in this case, you should try using the Seo Yoast plugin. For more information about this regard, you can check this useful tutorial here -> https://kb.yoast.com/kb/custom-open-graph-tags/

Hope this helps!

Thanks for your understanding!

Post count: 30

Thank you, removing this code from that file and the mobile functions file did the trick:


if (!empty($td_image[0])) {
echo '<meta property="og:image" content="' . $td_image[0] . '" />';
}

Viewing 3 posts - 1 through 3 (of 3 total)
The forum ‘Newspaper’ is closed to new topics and replies.