Try adding the code below in your theme functions.php file, it will enable featured / thumbnail images for Ads. If you will have a main image selected in the Advert Gallery then the image should be used when sharing an Ad on Facebook (assuming the images if big enough, it is to small FB will ignore it).
add_filter( "adverts_post_type", "my_adverts_post_type", 10, 2 );
function my_adverts_post_type( $args, $type = null ) {
if( $type == "advert" ) {
$args["supports"][] = "thumbnail";
}
return $args;
}
Hi
I tried this code, but still I’m getting only the website logo for sharing
even I added a new ad after including the code, but the same result
Hi, does the Ad you are sharing has a main image selected in the Gallery? also are you using some SEO plugin (like Yoast SEO) it should help with selecting the proper image.
If nothing will work please paste here a link to a page where you are having this problem i will take a look at it.