WordPress og:image not working in whatsapp?
WordPress og:image not working in whatsapp?
WordPress og:image not working in whatsapp?
The code you used should work. BTW to me, as the code is not working, the best approach would be to unset the og:url from Jetpack and do it on your own? I’m taking your code and adding mine and editing where necessary: <?php /** * Change HTTPS to HTTP * @param string $url Default … Read more
It is facebook social graph cache. I’ve cleared it on debug linter and everything fine now. https://developers.facebook.com/tools/debug/ You can clear cache automatically via Facebook Graph Api: POST /?id={object-instance-id or object-url}&scrape=true More info here: https://developers.facebook.com/docs/sharing/opengraph/using-objects
Okay, now I’ll try to answer your question, but first a quote from the Yoast SEO Guide: Some plugins, most specifically the All in One SEO plugin, use so called “automated descriptions”. They use the first sentence of a post to fill the meta description by default. That’s not very smart. That first sentence might … Read more
Facebook meta tags not working properly on WordPress Site
Yes, the global post object is already set when wp_head is called. An example for a function body from this post: // restricted to singular pages only if ( ! is_singular() ) return; // there has to be a featured image set $thumb_id = get_post_thumbnail_id(); if ( empty ( $thumb_id ) ) return; // FALSE … Read more
From what I understand, you need help framing your if logic? And the php tags usage dont look right either. Does this help – <?php if(!is_single()){ if(is_home() || is_front_page()){ // not sure if you have set a static page as your front page echo ‘<meta property=”og:url” content=”‘.bloginfo(‘url’); .'” />’; }elseif(is_tag()){ echo ‘<meta property=”og:url” content=”‘.$_SERVER[“HTTP_HOST”] . … Read more
Retrieve image from Open Graph of an external URL and set as featured image
$attachment_id is simply the numerical ID assigned to any media you have uploaded. You can write: echo wp_get_attachment_image(‘1′,’large’); to display the large size of image attachment with ID of 1. You should setup a new query to get all of the attachment IDs associated with the current post, then you can get_posts(‘post_type=attachment’) Check this example … Read more
Checking if certain header meta data is set