How to Disable the Function Add Facebook Open Graph Meta Data

This topic has 26 replies, 2 voices, and was last updated 7 years, 2 months ago ago by Rose Tyler

  • Avatar: Unionfor Web
    Rodrigo
    Participant
    August 17, 2017 at 19:13

    Hello,

    I would like to know how I can disable the Add Facebook Open Graph Meta Data function, as I found it unnecessary as I already use a plugin that does it (I use Yoast for optimization and SEO purposes).

    Note: I am using the child theme, so I would like to know if there is a possibility of doing it in the child theme so there will be no later problems.

    Thanks in advance.

    Best regards,
    Rodrigo Macedo

    25 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 18, 2017 at 08:33

    Hello,

    Please try to add this code in function.php file of your child theme:

    function et_add_opengraph_doctype( $output ) {
      return '';
    }

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 18, 2017 at 16:57

    Hello,

    I did as I said however the same did not work, I added the following code in the functions.php file in the child theme and when updating the page the open graphs tags are still in the source code being duplicated.

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 21, 2017 at 08:55

    Hello,

    Please provide screenshots for better understanding.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 22, 2017 at 20:14

    Hello Rose,

    Sorry for the delay, come on, below the Screenshots taken from the source code of the site showing the duplicate facebook open graph code and the code added in the functions.php file of the child theme as previously reported.

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 22, 2017 at 20:16

    Note: I forgot to tell you, the tags that are on top are Yoast (Plugin that I use SEO) and possibly the tags in the bottom are the ones of the theme itself, the ones that are automatically generated in the case by the theme itself according to the Information sought in WordPress…

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 23, 2017 at 10:47

    Hello,

    I have sent this topic to our developer, unfortunately, he is on vacation, and we may return to your query only in a week. Please wait, sorry for the inconvenience.

    Regards

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 28, 2017 at 12:46

    Hello,

    Please comment this line of code http://prntscr.com/gdz4rr

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 28, 2017 at 15:42

    Hello Rose,

    You said you should comment on this line, but where should I comment? In Theme Parent?

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 28, 2017 at 16:08

    Hello,

    In theme-function.php file of your parent theme (/woopress/framework folder) http://prntscr.com/ge299b. If it helps you will be needed to repeat such change after every theme update.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 28, 2017 at 19:02

    Hello Rose,

    I did as informed, I commented only the line according to Screenshot, but without success still with the results, the lines with the tags are still there.

    I edited the file as informed in the main theme (Parent theme).
    “theme-functions.php in /woopress/framework.”

    Note: I use a W3TC Cache plugin, and have already cleaned it to see if the problem was not with it.

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 29, 2017 at 12:35

    In this case, please write this in function.php file of your child theme:
    remove_filter('language_attributes', 'et_add_opengraph_doctype');

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 29, 2017 at 16:01

    Hello Rose,

    Without success, it still remains in the source code of the site, I re-cleaned the entire cache in the w3tc plugin and still nothing.

    I did the browser cache cleanup too…

    See the code added to the functions.php file of the child theme below:

    Do you want me to tell you access to WordPress and FTP Access so you can follow up better or try to make that change?

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 29, 2017 at 16:08

    Yes, please provide wp-admin and FTP access in Private Content.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 29, 2017 at 17:25

    Hello Rose,

    Follow the access data via Private Content.

    Best regards,
    Rodrigo Macedo

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 30, 2017 at 10:52

    Hello,

    Please check now. We made changes in theme-funcrions.php file.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 30, 2017 at 14:34

    Hello Rose,

    I checked and Tags still keep showing up in the source code of the site. It did not work yet… :/

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 30, 2017 at 14:54

    Please check screenshot http://prntscr.com/gey14g and clear cache, or do you mean something else?

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    August 30, 2017 at 19:15

    Hello Rose,

    I think you still do not understand what I’m trying to remove then from the source code.

    Look at the Print below, see that there is a red frame at the top and a red line at the bottom. Note that there are the “OG:” Facebook Tags twice in the source code, the one inside the frame at the top are generated from the Yoast plugin that I use, and the ones at the bottom of the line should be the Tags That the theme itself is generating. I would like to remove them because it is doubling to the Facebook Debugger when checking the URL.

    I saw that what you removed was just in the second line of the source code where there was:

    <html lang="pt-BR" xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml" prefix="og: http://ogp.me/ns#">

    Is it clearer now?

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    August 31, 2017 at 13:20

    Hello,

    Our tags were deleted. Other tags are added by SEO plugin.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    September 1, 2017 at 14:22

    Hello Rose,

    I checked here as to what you informed and I came to the conclusion that Tags are being generated from the same theme, since I did another installation in a Subdomain and did not activate any of the SEO Plugins, just the standard Plugins that the Theme asks to work correctly .

    See below the Source Screenshot where the “OG:” tags are highlighted.

    I will ask you to review your concept right, I would like to remove them because I use the theme in a domain where it already has an SEO plugin and this is causing duplication in these Tags.

    I await your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 4, 2017 at 13:14

    Hello,

    Please comment this line https://prnt.sc/ggw62y in framework/theme-functions.php

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    September 6, 2017 at 13:35

    Hello Rose,

    I made it as informed and now it went right, only the “OG:” tags being generated from the SEO Plugin are in source code and there is more duplicity, thanks a lot for the help.

    Now just one question before closing this call completely, I commented the line that you informed to remove only the “OG:” tags from the source code (which was what I needed), and left as it was previously the top of the code source where you had previously removed in another response.

    To better understand what I mean by see below a Print of the source code:

    What I want to know is if I should remove that top too as soon as you had removed it in previous answers or can I leave it? Does it affect SEO in any way?

    Well as the SEO plugin I use adds just the “OG:” tags I believe this code at the top should be of some importance.

    Thank you in advance and look forward to your next interaction!

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 7, 2017 at 12:14

    Hello,

    You may leave it.

    Regards

    Avatar: Unionfor Web
    Rodrigo
    Participant
    September 8, 2017 at 13:51

    Hello Rose,

    Well being so I then close this call, thank you very much for the help.

    Best regards,
    Rodrigo Macedo

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 8, 2017 at 14:38

    You’re welcome!

    Regards

  • Viewing 26 results - 1 through 26 (of 26 total)

The issue related to '‘How to Disable the Function Add Facebook Open Graph Meta Data’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.