• Resolved xjamasterx

    (@xjamasterx)


    Hi there,

    I noticed that when classified posts are shared on social media sites like Reddit, the sites are unable to properly fetch the featured image and use it for the thumbnail.

    How can we get that up and running? Our posts are often shared on social media.

    Thanks so much.

    • This topic was modified 6 years, 6 months ago by xjamasterx.
    • This topic was modified 6 years, 6 months ago by xjamasterx.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    one thing you can do is add the code below in your theme functions.php file it will enable featured images for the Adverts and if the Advert has a featured / main image selected then this image should be used when sharing on FB (assuming the image is big enough to be used by FB).

    
    add_filter( "adverts_post_type", "my_adverts_post_type", 10, 2 );
    function my_adverts_post_type( $args, $type ) {
        if( $type != "advert" ) {
            return $args;
        }
        $args["supports"][] = "thumbnail";
        return $args;
    }
    

    I also found this plugin works with wpadverts and automatically picks a featured image for you..https://www.ads-software.com/plugins/easy-add-thumbnail/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Social media sites not fetching featured image for thumbnail’ is closed to new replies.