Support » Plugin: Post Avatar » Vicky: Function you helped me with needs more help.

  • Hi Vicky,

    We corresponded a year ago or so in this forum, where you helped me develop some code for my child function file. It hooked into wp_head and forced Facebook shares to use an image of the author that was inserted into the post by a plugin called Post Avatar, if there were no featured images. It also tested the featured image to see if it was large enough for Facebook (200px), and if not, and there were no author image, it showed the default image for the site.

    It worked great for a long time, but for some reason, with the latest WordPress, it stopped working properly, and now, unless there’s an author image, only the default image gets shared, not the featured image.

    I wonder if you can help me again? I could send you the code as it is, so you could look it over.

    When looking at Facebook’s ‘scraped’ info on their debugger, the featured image IS listed as an og:image, but it uses the default image every time anyway, which is listed last. So, maybe it just takes the last image listed. I wonder if there’s a way to prevent the default image from being included in the og:image list, if there’s a qualified featured image or author image. That may solve the problem.

    I’ve tried coming up with an ‘if’ statement to do that, but it’s not working.

    I hope you can come to my rescue again. Thank you!

    P.S. I hope you’ll either work this code into your plugin, or created a new one as a supplement to Post Avatar.

    https://wordpress.org/plugins/post-avatar/

Viewing 1 replies (of 1 total)
  • Funny thing is, when I look at old posts and share, the featured image is exhibited in the FB share. However, I think this may be just because FB has that image cached from previous shares. If I go to FB debugger and ‘scrape again,’ it will not show the featured image anymore, but just the default image.

Viewing 1 replies (of 1 total)
  • The topic ‘Vicky: Function you helped me with needs more help.’ is closed to new replies.