Define Classipress first ad image as Facebook image

While setting up a WordPress / Classipress website I needed to insert the correct Open Graph tag so that when a specific ad was shared on Facebook, the correct image would be picked up.

This works for both an Classipress Ad or a “normal” blog post, using the first image for the og:image tag. In a blog post, if a featured image exists that’s the one that’s used, even if it’s not the first one on the post.

So I wrote a WordPress plugin to do just that ;-)

Here’s the plugin: Classipress Ad Facebook Image

No warranties what so ever. It’s dirty code, but it does the job.

Deixe um comentário

O seu endereço de email não será publicado. Campos obrigatórios marcados com *

Please copy the string qr9wug to the field below: