• Resolved nagahxp

    (@nagahxp)


    Greetings
    if I’m trying to share any ad, it is sharing my website logo not any of the ad images

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    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;
    }
    
    Thread Starter nagahxp

    (@nagahxp)

    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

    Plugin Author Greg Winiarski

    (@gwin)

    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.

    Thanks for the tip ! 😉

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Facebook sharing Image’ is closed to new replies.