How To Control What Image a Site Grabs When Shared

13 replies
I would like to know if there is a way to control what image is chosen when someone shares my blog on facebook, blog, web 2.0, etc.

It is currently pulling an image from my sidebar (last one on bottom) - I DON'T want this image to represent my blog.

Thanks in advance for any suggestions.

Carol
#control #grabs #image #shared #site
  • Profile picture of the author phpbbxpert
    Try this

    Edit your header in a text editor inside the <head></head> tags
    Adding
    <link rel="image_src" href="http://example.com/facebook-will-use-this.jpg" />

    Make sure you change the path to the image you want to use.
    {{ DiscussionBoard.errors[3441338].message }}
  • Profile picture of the author Carol_A
    This is a self-hosted WP blog with Thesis theme. I can only upload an image or choose the URL of an image for header. How to insert this code....css?

    TIA,

    Carol
    Signature
    {{ DiscussionBoard.errors[3441379].message }}
  • Profile picture of the author phpbbxpert
    You would edit the Thesis header.php

    Go to Appearance in WP admin
    Click Edit

    Then click the Header link

    On a new line after the <head> opening tag add the code I posted above.

    Then get the path to the image you uploaded and put that in the href of this code.
    Then click Update File at the bottom.

    Once you done post a like to the page so I can check that your image path is correct.. or PM it to me.
    {{ DiscussionBoard.errors[3441415].message }}
  • Profile picture of the author Carol_A
    Awesome, phpbbxpert!

    Thanks so much.

    On my way out the door, but will do this when I get home later tonight.

    Thanks again for taking the time to help!

    Carol
    Signature
    {{ DiscussionBoard.errors[3441464].message }}
    • Profile picture of the author Carol_A
      There is no 'header link' . . .

      I clicked on: Appearance, then Editor

      I have: Archives Page Template, Comments, Custom Template Page Template, Main Index Template, No Sidebars Page Template, Theme functions, custom_functions.php and then Style Sheet (style.css)

      Is something corrupted that I do not show header?

      TIA,
      Carol Amato
      Signature
      {{ DiscussionBoard.errors[3443485].message }}
  • Profile picture of the author phpbbxpert
    I have never personally looked at Thesis, I build my own themes, they may have done something different.

    Edit the Main Index Template and see if there is a <head> tag in the beginning of the file somewhere.

    Let me know what is there.

    NOTE: there might be extra stuff in the head tag, eg. <head profile="http://gmpg.org/xfn/11">
    {{ DiscussionBoard.errors[3443563].message }}
  • Profile picture of the author SteveJohnson
    Do NOT try to edit any of the core Thesis files. You'll end up with the white death screen, or a nasty PHP error.

    First, use the media menu in the WP dashboard to upload the image that you want displayed. Don't attach the image to any posts, but make note of the complete URL that the uploader gives you after the image is uploaded.

    Then you'll want to edit the custom_functions.php file that you mentioned seeing.

    Make a copy of what's already there FIRST!!

    Open the file in the editor, hit ctrl-a to select all, ctrl-c to copy. Open a new text file (with Windows, right-click on the the desktop, then New, then Text Document). Click inside the new doc and ctrl-v to paste. Save it, name it whatever you want.

    Now - in the open file editor file, go to the very end. There may or may not be this at the end:
    Code:
    ?>
    If there is, you'll want to click to set your cursor on the line above it.

    Copy/paste the following into the open file:
    PHP Code:
    function my_web20_image() {
      echo 
    '<link rel="image_src"  href="http://the path to your image.jpg" />';
    }

    add_action'wp_head''my_web20_image' ); 
    Double-check your typing. The 'echo' and 'add_action' lines should both end in semi-colons, and a pair of curly braces {} should enclose the 'echo' line. The quote marks are single quotes, not backticks (the key to the left of the #1). Those are the most common typos that cause the white death.

    Click the Update or OK button. Then in another window, open up your home page. View the source code. Somewhere just above the closing head tag ( </head> ), you should see the <link> you just set up.

    Easy schmeezy.

    PM me if you have troubles.
    Signature

    The 2nd Amendment, 1789 - The Original Homeland Security.

    Gun control means never having to say, "I missed you."

    {{ DiscussionBoard.errors[3444092].message }}
  • Profile picture of the author Carol_A
    Steve,

    I am printing out the above post so that I can follow easier, and go step-by-step.

    I am showing my age!

    Thanks so much for your help.

    Will post back if I hit a snag.

    Again, appreciate it!!
    Signature
    {{ DiscussionBoard.errors[3445115].message }}
    • Profile picture of the author Carol_A
      Just want to say, STEVE IS AWESOME!

      It really irked me that my site was not being represented on the World Wide Web as I chose...(control freak)?......but Steve provided the help I needed to ensure that I accomplished my goal!

      Thanks so very much!!
      Signature
      {{ DiscussionBoard.errors[3445873].message }}
      • Profile picture of the author Karen Blundell
        Steve is a class act and one of the few real WordPress pros in this forum
        I'm glad he was able to help you, Carol!

        Signature
        ---------------
        {{ DiscussionBoard.errors[3446689].message }}
  • Profile picture of the author Carol_A
    . . . continued . . .

    Great, the image I want representing my site is displaying wherever someone shares it, fantastic -- thanks again!! FANTASTIC!

    Question: Am I too picky?

    In facebook, some "shared" my blog post.....looked great with the pic all sharp and the description of post...clear, however.....up at the top, on a facebook wall, it says "index" first line, second line with URL, then description.

    That is driving me nuts. lol

    I recently created a static page, which is named "Welcome"

    I had to name another page for my "posts" to be displayed on......the only name it takes is index.

    Any work around?


    Blog: CarolAmato dot com (static page, labeled 'Home' on Nav.)

    Posts: CarolAmato dot com/index (labeled 'Carol Amato's Blog' on Nav.)

    Here is a screen shot:

    http://www.carolamato.com/images/fbpost.jpg

    When I have attempted to change the name, it doesn't show up anymore until I change it back to index.

    No hurry.....

    TIA,
    Carol

    P.S. Thesis theme...
    Signature
    {{ DiscussionBoard.errors[3453846].message }}
  • Profile picture of the author phpbbxpert
    Its because the title attribute value of that tab is index
    <a href="http://www.carolamato.com/index/" title="index">Carol Amato’s Blog</a>

    Also the title tag for that page is index.

    You need to change both and it should reflect on Facebook and SEO
    {{ DiscussionBoard.errors[3455611].message }}
    • Profile picture of the author Carol_A
      Thanks for helping out!

      I will give it a try at an obscure time so if I mess up, it won't matter much.

      Signature
      {{ DiscussionBoard.errors[3455986].message }}

Trending Topics