How to Disable the Function Add Facebook Open Graph Meta Data

This topic has 26 replies, 2 voices, and was last updated 6 years, 7 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.

    Screenshot 1 – Screenshot 1
    Screenshot 2 – Screenshot 2

    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:
    Screenshot

    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.

    Screenshot

    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

  • 1 2
    Viewing 20 results - 1 through 20 (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

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