Site logo

Archived topic

prefix="og:http://ogp.me/ns#"

7 replies · Started by Eugene Lemuel on December 10, 2020

Viewing posts 1–8 of 8

I don't know if this code is already hurting my site as I'm losing significant traffic. But there might be other factors. When I use the browser inspection tool, I see this code right after <!DOCTYPE html>: <html lang="en-US prefix="og:http://ogp.me/ns#">. I know it's the open graph protocol but their site is already in HTTPS. And their markup code is <html prefix="og: https://ogp.me/ns#">. Is there a way to get rid of it? Is it my Marketer theme that is causing it or a plugin?

But if I check Generatepress.com and other sites using GeneratePress, the OGP code is not there. Instead, I only see <html lang="en-US">.

Hi there,

I'm not seeing that code in the default Marketer template:
http://gpsites.co/marketer/

Perhaps it's added by another plugin?

You're right. My SEO plugin has added it.

Glad to hear :)

I've found a hook to remove Open Graph tags from my SEO plugin documentation. Can I use it in the Hooks Element?

/**
* Hook to remove og:tags
*/
add_action( 'rank_math/head', function() {
remove_all_actions( 'rank_math/opengraph/facebook' );
remove_all_actions( 'rank_math/opengraph/twitter' );
});

I see. I tried the code in Code Snippets but didn't solve the issue. I already opened a ticket for the support team of my SEO plugin since it's a plugin issue. Thanks a lot for the help, Leo.

No problem :)

This archived topic is closed to new replies.