WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] How to specify og:image using filters? (5 posts)

  1. BornKillaz
    Member
    Posted 2 years ago #

    Hi!

    Since I'm using a custom premium theme, yoast can't find the images on the content.

    How can I use a filter to strictly specify in my theme the image to use in open graph?

    Thanks.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Easiest way is to add the og:image tag yourself and hook it on the wpseo_opengraph action.

  3. BornKillaz
    Member
    Posted 2 years ago #

    Thank you very much for point me out the best solution. It's working! :)

  4. Joost de Valk
    Member
    Plugin Author

    Posted 2 years ago #

    Cool :)

  5. billvf
    Member
    Posted 1 year ago #

    Hi,

    I think I'm trying to do the same thing here but would appreciate a more detailed answer if someone is willing to provide it :)

    I am using a theme that uses non-square thumbnails, which I like. However, when I share the post on facebook, it crops my image to a square, sometimes chopping off important parts of the image.

    What I would like to do is add a custom field to my posts where I specify the url of the square version of the thumbnail that I will create. Then I would like to write some code that will use that image in og:image. How can I go about doing that?

    Or is there a better solution to this that I am missing.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic