facebook not fetching the logo of website - wordpress

The homepage link of website posted in share box of facebook fetches a old image of the old story but not the logo of website.
In the header file of my wordpress theme i made the following change
<!--FB image-->
<meta property="og:image" content="<?php if (is_single() || is_page()) {$fbthumb = wp_get_attachment_image_src(get_post_thumbnail_id(), 'slider'); echo
$fbthumb[0];} else {echo 'http://clientdemo.crayoninfotech.com/boomnews/wp-content/uploads/2014/10/logofb1.jpg';}?>" />
The problem is still after passing the correct link of logo facebook take some other random image from one of website old story.

When I did this it took a while before it showed up on FB. Use this to see the effect of your code changes: https://developers.facebook.com/tools/debug

Related

Where is the favicon?

This might be a silly question... I usually add my Favicon's in the area of the my site, but a previous developer has set this website up.
I usually add code a bit like this:
<link rel="shortcut icon" href="<?php echo get_template_directory_uri(); ?>/assets/images/favicon/favicon.ico" type="image/x-icon">
The site has a favicon but I can't find where its being created, or even where its being held in the WordPress theme: https://www.sbccanford.co.uk/
Any ideas? I've popped the URL to the website above.
Thanks,
Meg
It seems that was added in the customizer. Go to Admin Dashboard -> Appearence -> Customize -> Site identity. and its there.

AMP pages appear in Google Desktop search results

I'm using WordPress on my website. To add the AMP pages to my website I use the official WordPress AMP plugin and another plugin called "AMP for WP". I've been using it for 3 months now. Recently, I discovered a Non-AMP page while searching Google from Laptop (Not mobile device). I checked the page source and found that the rel-canonical tag is properly set to the non-AMP page. I don't know why it appeared in the desktop search.
To see the example google this "how to change Author box gravatar size" and you'll find the AMP page and the non-AMP page doesn't appear.
Where is the problem?!
It most likely was designed outside of the Wordpress environment.
We design our AMP pages outside of the Wordpress environment and the canonical tag is just like a normal page.
In short, our amp pages self contained and are desktop & cell phone ready.
Only one canonical tag is needed then. (no use of the rel-canonical tag)
$strCanonicalUrl ="https://" . $_SERVER['HTTP_HOST'] . parse_url(
$_SERVER['REQUEST_URI'], PHP_URL_PATH );
...
<title >This is the title of the AMP page</title>
<meta name="description" content="This is the description of the AMP page">
<link rel="canonical" href="<?= $strCanonicalUrl ?>" />
<meta property="og:locale" content="en_US" />

Does anyone know how to add meta descriptions to wordpress?

This is my first ever post on here. Does anyone know how to add meta descriptions to wordpress?
Many thanks,
Tung
Change the Blog description goes here and add this code into your theme functions.php
function my_meta_description(){
echo '<meta name="description" content="Blog description goes here" />';
}
add_action('wp_head','my_meta_description');
You may setup content of meta description at admin page -> appearance -> customized -> site identity -> tagline (wp 4.4)
to add meta description on page, put this code between head
<meta name="description" content="<?php bloginfo('description'); ?>" />
You can edit it in menu "Appearance" in the "header.php" file. There you can edit ot. Or you can also download one of the wordpress plugins:
Yoast SEO (recommend) or All-in-SEO-pack. It will help you to customize any meta's you need!

When I share a post on facebook the image is wrong

All of a sudden yesterday... When I share a post on facebook, it is using a different image. The share box shows the correct image set as the featured image in the post but it uploads a different image.
Can anyone help...
Thanks
Joe
add a meta tag to your header
<meta property="og:image" content="<?php wp_get_attachment_thumb_url( $post->ID );?>" />

Featured image and og meta not showing up in Facebook

I'm having an issue with the thumbnail / featured image, headline and og meta not showing up if I paste a link in FB with one specific post but not others. (Flushing the cache on FB doesn't work).
The site's on WordPress and the Yoast SEO plug-in should sort out the OG meta tags if you correctly enter your FB settings in the right section and I believe I have. I have also just pasted the code in my theme's functions.php
Here is my most recent blog post where it has no image nor headline: http://robcubbon.com/essential-wordpress-plug-ins-website/
– however it works on other posts
On the Debug tool it says: Must: "The 'og:type' property is required, but not present". But it's there : <meta property="og:type" content="article" />
It also says: Should: "The 'og:url' property should be explicitly provided, even if a value can be inferred from other tags." And it's there:
<meta property="og:url" content="link here" />
The OG Meta is exactly the same on this post (as far as I can see) as all other posts that have featured image and other meta info displaying properly in FB.
I would really appreciate if someone know why this is happening

Resources