Support » Plugin: Yoast SEO » How to remove the prefix attribute in the html tag

  • Resolved Ramanan


    The prefix=”og: attribute in the <html …> tag isn’t required. Is there a way to remove that. It is added by an add_fiter hook inside a class and seems difficult to remove. Anyone knows how to remove it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Pcosta88



    Yoast does not have a way to easily remove it. The tag is added in the tests/frontend/test-class-opengraph.php folder at line 104. You may need to edit the plugin to remove it.

    Unfortunately, there’s a difference between the support we can offer and the level of programming needed to change (core) features of our plugin. Since we don’t want to take the risk that we break your website by suggesting incorrect or incomplete code, we cannot advise you on how to make such changes. And even though we cannot be of any assistance, you’re completely free to change anything in the plugin to better suit your needs.

    We highly recommend checking out the Yoast supported partners here:

    Note, that we have also opened up a request to make editing it easier. We suggest commenting on it here: You may need to make an account in order to comment.

    Plugin Support Pcosta88


    @superpoincare We also would like to know why you do not want it or what is meant by “not required”.

    We ask as according to the OpenGraph Protocol site: it seems as if OpenGraph tags need to be declared in order to use them. The prefix seems to accomplish this.



    Thanks for the information.

    I had seen the equivalent in Jetpack which doesn’t add that, so I thought I should remove it. But after your advise, I’d retract my question!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘How to remove the prefix attribute in the html tag’ is closed to new replies.