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