0

How do I set a featured image for the homepage? I am not concerned with the outcome of having or not having a featured image within wordpress itself. I want to control the featured image when it gets used via an external link, for example facebook.

  • What do you mean by "control"? – Joseph Leedy Sep 5 '12 at 2:24
  • This appears to be a Facebook API question, rather than a WordPress question... – Chip Bennett Sep 5 '12 at 3:20
  • @Joseph control means set and change the image. – Gaia Sep 5 '12 at 14:07
  • @ChipBennett it's for FB mainly, but I would like to also control it for other services. – Gaia Sep 5 '12 at 14:08
3

If it's only for Facebook purposes that you need it, you could add the following code to your header.php file (between <head> and </head>):

<meta property="og:image" content="http://ia.media-imdb.com/rock.jpg"/>

Of course replace the URL in content="..." with your own image URL.

A reference for all the Facebook meta tags is here: http://developers.facebook.com/docs/opengraphprotocol/

| improve this answer | |
  • Thanks. It's mainly for FB, but I would like to also control it for other services. – Gaia Sep 5 '12 at 14:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.