If you have troubles since the update to WordPress 4.5 please read this post before opening a new thread.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • #7222


    I am using Display theme.

    When I share url from one of my portfolio posts on facebook – it shows wrong thumbnail picture, not from this post.

    I try to use this plugins:

    – Facebook Thumbnails

    – Easy Facebook Share Thumbnails

    – Fix Facebook Like

    ,but it show me several other pictures or my gravatar, but still wrong.

    I want see the right post thumbnail when sharing post url on FB, please, can you help me, what I need to do?



    Foget to add link:


    try to start share any post url and thumbnail will always wrong, why?


    Please somebody help me with suggestion?



    to be honest I’m not sure why the plugins fetch the wrong image. You can try Slatelunchs open graph meta here: http://www.kriesi.at/support/topic/facebook-open-graph-protocol#post-23893

    <!-- Facebook Opengraph -->
    <meta property="fb:app_id" content="My Application ID" />
    <meta property="fb:admins" content="My Admin ID" />
    <?php if (is_single()) {

    $preview_small = get_post_meta($post->ID, "_preview_small", true);
    $preview_medium = get_post_meta($post->ID, "_preview_medium", true);
    $preview_big = get_post_meta($post->ID, "_preview_big", true);

    $preview = $preview_small;
    $link_url = $preview_big;
    $lightbox = 'boxes';
    $link = true;
    //change if necessary:

    // resizing? => take next sized picture
    if ($k_option['general']['tim'] == "1" && $preview_small == "")
    $preview = $preview_medium != '' ? $preview_medium : $preview_big;

    if (!kriesi_is_file($preview_big,'image'))
    $preview = $preview_small != '' ? $preview_small : $preview_medium;
    $link_url = $preview_big;

    // no bigpicture? => no lightbox
    if ($preview_big == "" || $k_option['portfolio']['portfolio_click'] == 2) { $lightbox = ''; $link = true; $link_url = get_permalink(); }
    // the kriesi_build_image function used here checks if the image should be resized.
    // the function is located in framework/helper_functions

    $preview = kriesi_build_image(array('url'=>$preview,
    'height'=> '124',
    'width'=> '280',

    <meta property="og:url" content="<?php the_permalink() ?>"/>
    <meta property="og:title" content="<?php single_post_title(''); ?>" />
    <meta property="og:description" content="<?php the_excerpt_rss() ?>" />
    <meta property="og:type" content="article" />
    <meta property="og:image" content="<?php echo $preview; ?>" />
    <?php } else { ?>
    <meta property="og:site_name" content="My Website Name" />
    <meta property="og:url" content="http://myurl.com"/>
    <meta property="og:description" content="<?php bloginfo('description'); ?>" />
    <meta property="og:type" content="website" />
    <meta property="og:image" content="http://A default image url for the website.com" />
    <?php } ?>

    Adjust the admin id, etc. and add the meta tags before the body tag in header.php.


    Thanx for the reply, I will try it.


    I hope it works :)


    Well, when I insert code in header.php it show me post thumbnail in any post at top-left of screen on site. Also I don’t know what is and where I can get my “My Application ID”… I have many customized changes make with this Display theme and probably broke something, so I will just leave all as is.

    Thanx for response anyway!

Viewing 7 posts - 1 through 7 (of 7 total)

The topic ‘Wrong post thumbnails when sharing on Facebook’ is closed to new replies.