• When sharing a separate ad page to Facebook, the wrong image is displayed. I use Yoast SEO and this has a default og:image in case no such is displayed in separate pages/posts/etc and this is the one showing up. Looking in the code for an advert page, the page do not create an og:image for the ad post.
    Is there any solution/workaround for this or could you consider adding this function for the primary ad image?

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

    (@gwin)

    Most likely Yoast is not detecting featured image as by default WPAdverts is not using thumbnails, you can enable thumbnails support and see if this helps

    
    
    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;
    }
    
Viewing 1 replies (of 1 total)
  • The topic ‘No og:image in code – displaying wrong on facebook’ is closed to new replies.