This topic has 26 replies, 2 voices, and was last updated 7 years, 3 months ago ago by Rose Tyler
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
Hello,
Please try to add this code in function.php file of your child theme:
function et_add_opengraph_doctype( $output ) {
return '';
}
Regards
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
Hello,
Please provide screenshots for better understanding.
Regards
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
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…
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
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
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
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
In this case, please write this in function.php file of your child theme:
remove_filter('language_attributes', 'et_add_opengraph_doctype');
Regards
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
Yes, please provide wp-admin and FTP access in Private Content.
Regards
Hello Rose,
Follow the access data via Private Content.
Best regards,
Rodrigo Macedo
Hello,
Please check now. We made changes in theme-funcrions.php file.
Regards
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
Please check screenshot http://prntscr.com/gey14g and clear cache, or do you mean something else?
Regards
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
Hello,
Our tags were deleted. Other tags are added by SEO plugin.
Regards
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
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
Hello,
You may leave it.
Regards
Hello Rose,
Well being so I then close this call, thank you very much for the help.
Best regards,
Rodrigo Macedo
You’re welcome!
Regards
Tagged: disable, facebook, open graph, woocommerce, wordpress
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