Greetings !
I have a problem with og meta tags. I’m using Yoast SEO plugin for open graph tags. right now there are two og:image tags in my article’s header. obviously one is from yoast plugin. since i’m using jetpack, i thought this is a complicit with jetpack plugin. I tried by disabling jetpack but the issue didnt solved. I disabled all the plugins one by one and tried to identify what cause the issue. I disabled all the plugins but problem remain the same.
Then I activate another theme and check. Believe me my problem was solved. Then I activated the theme back and problem occurred again. So its confirmed that the problem is with the theme. I have really no idea how to remove this other unwanted og:image tag from my theme.
Please help me to solve this issue. I want to keep only the one which yoast creates .
Thanks !
Screenshot:
http://asidisi.com/wp-content/uploads/2016/03/og-image.jpg
Site: http://asidisi.com
-
This topic was modified 10 years by
lankangamer.
-
This topic was modified 10 years by
lankangamer.
Hi,
The og tag will not affect your website in any way. It is simply put there in case there is no seo OG tag. If you really want to remove it when yoast is active you can add a condition to check if a plugin is active and create your code so that the og tag only gets inserted when the certain plugin is not active: https://codex.wordpress.org/Function_Reference/is_plugin_active and use it to alter this function: http://screencast.com/t/IJJf4eaoATr
I hope this helps.
Thank you!
Hello.
@Bogdan B.
1. What will happen when the theme is updated if we change the php file?
2. Maybe you shoud provide the option to disable this in theme’s panel.
Consider the following scenario.
– The meta tag the theme adds is for the featured image of a post.
– The plugin for managing OG tags I use permits to specify a custom image – the tag for this image is also added to the page. (This is very useful when I use portrait images when there is the chance that fb centers the image on the post thumbnail and the view if not ok)
Thanks
Alex G.
Hello,
1) If you perform a standard update, that will replace all the theme files so your customization will be lost. In each theme package, there is a patch folder that contains only the changed files between versions. If you use the patch and replace just the modified files, you can possibly avoid the replacement of the file if it has not been changed between versions. The child theme works in the same manner. There is no update proof way of altering the theme files.
2) Thank you for your suggestion. This request however will need to become more popular if we are to consider implementing such an option.
Thank you!