• crazy4subscriptionboxes

    (@crazy4subscriptionboxes)


    When I post a blog link to Facebook most of the time it pulls a picture from that post to display as the thumbnail on Facebook but a few of my posts pull some random picture having nothing to do with that post. Is there some code or other method I can use to tell Facebook to use a specific picture when I post a link there? I’ve googled it and tried a few suggestions but they haven’t worked.

Viewing 3 replies - 1 through 3 (of 3 total)
  • In the header template file between the <head> tags you need to add facebook open graph meta tag that tells facebook which image to use. Example:

    <meta property="og:image" content="thepictureiwannause.png"/>

    What image url you want to add depends on what image you want to show.

    Thread Starter crazy4subscriptionboxes

    (@crazy4subscriptionboxes)

    If I do that in the header template it will then display to same picture regardless of my post. I’d like to set the image displayed at the post level so each time I post to Facebook it will display a picture relevant to that post. Is that possible?

    Also in youR example above do I type it exactly as you have it only replacing the image name where you typed “thepictureiwannause”? Or where it says Og:image do I need to put the image name there too?

    I’m also not sure where exactly to place this command line. I see the word head throughout my header php file., so between what two references of <head>? I do see another meta tag in this file, I suppose I could insert this line right above it? Here is the meta tag I currently see in my header php and where I’m thinking of inserting the command line you provided. would that work?

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="https://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
    <head profile="https://gmpg.org/xfn/11">
    INSERT META TAG FOR PHOTO HERE?
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <title><?php wp_title('?', true, 'right'); ?> <?php bloginfo('name'); ?></title>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />


    [Please remember to use the code buttons when posting code here]

    Thread Starter crazy4subscriptionboxes

    (@crazy4subscriptionboxes)

    One other question. When I look at how my post pictures are typed it’s like this because it’s grabbing them from my wordpress media library:
    https://www.crazy4subscriptionboxes.com/wp-content/uploads/2013/07/googaro-box.jpg

    In this case would I enter that whole thing as the “thepictureiwannause.png” part or just copy googaro-box.jpg in the command line you provided? And is jpg ok or does it have to be png?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Choose which picture displays on Facebook post’ is closed to new replies.