• Resolved Heikki

    (@heikkiwaan)


    Hello.

    Facebook is getting me a random product image instead of the default site logo.
    How can i fix this? I’d like to show the brand logo instead of a random photo.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Michael Ott

    (@mikeyott)

    Have you used the Facebook debugger?

    https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fwww.fataliiseeds.net%2F

    It says your connonical URL is https://www.fataliiseeds.net/product/ramiro/ and if you look at the source for that page the og:image is https://www.fataliiseeds.net/wp-content/uploads/fromoldsite/ramiro3-640×640.jpg – which is what Facenook is using.

    This is something the plugin can not fix.

    Thread Starter Heikki

    (@heikkiwaan)

    Hi.
    Any ideas on how to fix that then?
    The url you mentioned, changes every time i fetch it in facebook debugger.
    So there is some kind of randomization on that, but i don’t know having that kind of function in any plugin…

    Plugin Author Michael Ott

    (@mikeyott)

    The only thing I can suggest is switching to another theme and see if the problem goes away when testing with the FB debugger. If it suddenly works properly, then you know it’s something to do with your theme.

    Failing that, try disabling plugins one at a time until the problem goes away.

    The only thing I know for sure is my plugin doesn’t have any functionality for randomising your cononical URL – or anything else for that matter.

    Good luck.

    Thread Starter Heikki

    (@heikkiwaan)

    Why is there a “resolved” -tag on this post even if it isn’t resolved?

    the problem here is that i am not running a blog.

    I digged deeper in the code and searched from internet.
    You are using
    if(is_home())
    and
    if ( !is_home() )

    But the is_home() NEVER returns “true” in my site.
    The reason:

    Quote:

    is_home() is supposed to return true for the “blog” home page, where your most recent posts show up, not the “front” home page.

    i have a static page as a front page (url ‘/’)
    and so this plugin will not work.

    And the reason i have a random photo, is that the site is randomizing the displayed results. It shows me the first product as og:url

    So can you please use something else than is_home to detect the homepage, or otherwise fix this plugin? I would be verry happy ??

    BTW, i am using WooCommerce and StoreFront

    • This reply was modified 5 years, 8 months ago by Heikki.
    • This reply was modified 5 years, 8 months ago by Heikki.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘I am getting random pic instead of the default i would like’ is closed to new replies.