wpseo_opengraph_image not working
-
Hi,
I’m trying to use the filter
wpseo_opengraph_image
without success. There’s not a lot of documentation about it but I’ve find some examples in Internet and it seem that i’m implementing it fine but it doesn’t run like it should. I want to display an image saved in a custom field (from ACF plugin) image like this:function my_opengraph_image( $image ) { global $post; if(is_singular('post'){ $img = get_field('featured_image',$post->ID); $image = $img['sizes']['thumbnail']; } return $image; } add_filter( 'wpseo_opengraph_image', 'my_opengraph_image', 10, 1 );
I’m using
wpseo_metadesc
for other similar purposes and it work as it should.Any ideas about this?
Thanks
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘wpseo_opengraph_image not working’ is closed to new replies.