I have a wordpress 4.2.1 based website with Yoast wordpress SEO plugin. In this site I have several custom posts types such as "publications" with some custom taxonomies "keywords, authors" all are made by custom post type UI plugin.
When viewing the page source of articles published in that custom post type the code shows meta properties like:
<meta property="og:locale" content="fr_FR" />
<meta property="og:type" content="article" />
<meta property="og:title" content="bla bla bla- Marketing" />
<meta property="og:description" content="bla bla bla" />
<meta property="og:site_name" content="Marketing" />
Please, how do I make a Yoast SEO plugin show meta properties of custom taxonomies related to such post type?
well you can use wordpress functions to populate this data. but it should be within the wordpress loop.
<?php $post_id = get_the_ID(); ?>
<meta property="og:title" content="<?php echo get_the_title();?>" />
<meta property="og:description" content="<?php echo get_the_excerpt();?>" />
<meta property="og:site_name" content="<?php bloginfo('name'); ?>" />
Related
I am trying to use Yoast SEO fully. But my theme or some unknown plugins are introducing another opengraph tag section overwriting Yoast's metadata. How do I eliminate the second duplicate set?
Here is the list of plugins that are currently installed - Akismet Anti-Spam, AP Theme Utility Plugin, Featured Image from URL, Jetpack by WordPress.com, Page Builder by SiteOrigin, Proxy Cache Purge, Random Banners, Social Share WordPress Plugin - AccessPress Social Share (Tester), VaultPress, WP Extended Search, WP Responsive Recent Post Slider,Yoast SEO. The Social Share plugin is to show share buttons underneath each post and I did disable it to yield nothing in change of my metadata.
I have added this code my theme's functions.php file - add_filter( 'jetpack_enable_open_graph', '__return_false' ); which is a strong confirmation that Jetpack's open graph tags are disabled all across the site.
Please see the source of this link - https://www.tnilive.com/?p=5372
Here is Yoast's metadata
<!-- This site is optimized with the Yoast SEO plugin v11.0 - https://yoast.com/wordpress/plugins/seo/ -->
<meta name="description" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur - Latest Devotional Breaking News In Telugu | నాగ్పూర్ ప్రవాసులను పరవశింపజేసిన చాగంటి ప్రవచనం"/>
<link rel="canonical" href="https://www.tnilive.com/2019/04/29/chaganti-pravachanam-on-venkateswara-vaibhavam-in-nagpur-mesmerizes-audience/" />
<meta property="og:locale" content="en_US" />
<meta property="og:type" content="article" />
<meta property="og:title" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur" />
<meta property="og:description" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur">
<meta property="og:url" content="https://www.tnilive.com/2019/04/29/chaganti-pravachanam-on-venkateswara-vaibhavam-in-nagpur-mesmerizes-audience/" />
<meta property="og:site_name" content="Telugu News International - TNILIVE" />
<meta property="article:publisher" content="https://facebook.com/tnilivepage/" />
<meta property="article:tag" content="chaganti pravachanam" />
<meta property="article:tag" content="nagpur andhra association" />
<meta property="article:section" content="Devotional" />
<meta property="article:published_time" content="2019-04-29T15:42:05+00:00" />
<meta property="og:image" content="https://i.imgur.com/yI2Kwob.jpg" />
<meta property="og:image:secure_url" content="https://i.imgur.com/yI2Kwob.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:description" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur - Latest Devotional Breaking News In Telugu | నాగ్పూర్ ప్రవాసులను పరవశింపజేసిన చాగంటి ప్రవచనం" />
<meta name="twitter:title" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur" />
<meta name="twitter:site" content="#tnilive_editor" />
<meta name="twitter:image" content="https://i0.wp.com/i.imgur.com/1TDYQNc.jpg?ssl=1" />
<meta name="twitter:creator" content="#tnilive_editor" />
Here is another metadata set generated after this section and some other data
<meta property="og:title" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur" />
<meta property="og:description" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur">
<meta property="og:image" content="https://i.imgur.com/1TDYQNc.jpg" />
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:title" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur" /> />
<meta name="twitter:description" content="Chaganti Pravachanam On Venkateswara Vaibhavam In Nagpur" />
<meta name="twitter:image" content="https://i.imgur.com/1TDYQNc.jpg" />
If you observe closely, you can see that the og:image of Yoast SEO is different from that of the theme/unknown plugin/jetpack generated one in the second set. This is because Yoast only generates og:image tag when there is an image in the post content. And when there is just plain text even with featured image set, it doesn't put one. More info in this issue here - https://github.com/Yoast/wordpress-seo/issues/12794
Now all I want is to add some sort of a code into my functions.php file to make the second set of metadata go away except for og:image tag. Here is the expected result
<meta property="og:image" content="https://i.imgur.com/1TDYQNc.jpg" />
This way I can make sure that my Yoast SEO's metadata is retained and the og:image tag issue is also fixed.
I spoke to the theme developer and they mention that other than the title tag and description tag, their theme is not generating any opengraph tags as the one in the second set. I highly doubt Jetpack and any ideas are most welcome. Thank you.
I have a word press website, and when I share a blog on social media, all social media pulls up the thumbnails except Linkedin.
I have used the open graph tags perfectly. What could be wrong?
<meta property="og:title" content="<?php the_title(); ?>" /><meta property="og:description" content="<?php the_content();?>" /><meta property="og:type" content="post" /><meta property="og:image" content="https://www.intellectyx.com/blog/wp-content/uploads/2017/03/Analytics-400x225.jpg" />
How do I override the WordPress Facebook "og:title" content="(no title)" meta tag for an AddThis FB share button?
I added the meta tag:
<meta property="og:title" content="The Modern Rapunzel" />
to the child-theme header.php, but it's displaying "(no title)" in the FB share popup when I click on the AddThis button.
Running the Facebook debugger shows both meta tags are in there somewhere:
<meta property="og:title" content="The Modern Rapunzel" />
and
<meta property="og:title" content="(no title)" />
No idea where it's pulling that second one from; it's not defined in header.php
It seems that Facebook will not allow a music:song to have a og:url that is useful. As a result the link that shows up in a users timeline is dead.
I have even tried making the og:url be equal to the object page(shown below). Basically it is a failing page when called.
Is this due to the whitelist issue?
Or am I missing something in the documentation? How can I make that link that is in the timeline useful? "User listened to track on our Radio." track needs to be a valid link or not shown as a link. User,track and Radio are all made into links by default. Only the track is bad. It links to the facebook_object_page.
<meta property="fb:app_id" content="OurId" />
<meta property="og:type" content="music.song" />
<meta property="og:url" content="https://mysite/facebook_object_page.php?artist=<?php echo $_GET['artist'];?>&product_id=<?php echo $_POST['product_id']; ?>" />
<meta property="og:title" content="<?php echo $_GET['artist'];?>" />
<meta property="og:image" content="http://mysite/images/product_images/products_150/<?php echo $_POST['product_id'];?>.jpg" />
With the facebook iframe like button, am I able to specify what text shows up in a users stream?
When I use a plugin for a wordpress blog post it shows up at
USERNAMe likes POST TITLE on BLOG NAME
but when I try and put it on another page with the straight up iframe code, i just get:
USERNAME likes http://www.pagename.com/bla/bla/bla
How can I specify what text shows up?
Do you have open graph tags on your page, like:
<html xmlns:og="http://opengraphprotocol.org/schema/" xmlns:fb="http://www.facebook.com/2008/fbml">
<head>
<meta property="og:image" content="..." />
<meta property="og:site_name" content="..." />
<meta property="og:title" content="..." />
<meta property="og:url" content="..." />
<meta property="og:description" content="..." />
<meta property="og:type" content="article" />
</head>
More about those here.