WordPress featured image with ACF

So,

I use Advanced Custom Fields on WordPress to set an featured image that i host on flickr, this way i can query it perfectly in the template i am building.

Read More

But this image isn’t in the content(text) of the post, so for example Facebook or Twitter or any social media to share posts to don’t see this image.

So in posts wherefore i only have one image. Which i show on top of the post as background for the title won’t be shown inside the content and therefore social media don’t recognize it.

Bullet points:

  • WordPress Advanced Custom Fields plugin to add a field to a post where in i paste the url of the picture on flickr.
  • I can perfectly query the URL and implement it in the template i am building.
  • But this means that this picture isn’t in the post content(text). Therefore social media don’t seem to see this picture and don’t show a picture if users want to share a article from my website.

I really don’t know how to solve this and i hope that somebody has a solution.

English isn’t my first language so excuse me in case of any spelling or grammar errors.

Related posts

Leave a Reply

1 comment

  1. I don’t really get why you want to host your featured image outside WP or, more specifically, on Flickr… but if you can get its URL via ACF (I guess you’re using an URL field) and the issue is Facebook or Twitter doesn’t retrieve your image when you share your page, maybe you should implement Open Graph and Twitter Card meta tags.

    That’s, in your header.php inside <head>:

    <meta name="twitter:card" content="summary" />
    <meta name="twitter:site" content="@youraccount" />
    <meta name="twitter:creator" content="@youraccount" />
    <meta property="og:title" content="The title" />
    <meta property="og:type" content="website" />
    <meta property="og:url" content="http://www.example.com/your-page" />
    <meta property="og:image" content="http://www.example.com/your-flickr-image-url" />
    <meta property="og:description" content="Content description..." />