-
Hello, our job_listing post type (WP Job Manager) has square logos for the featured images which are unsuitable for og:images. We would like the default og:image to be used. I have tried this snippet to disable it but its having no effect. Thanks in advance!!
add_filter( ‘rank_math/opengraph/use_post_thumbnail’, function( $use_thumbnail, $post_id ) {
// Check the post type and conditionally disable setting featured image as og:image
if ( ‘job_listing’ === get_post_type( $post_id ) ) {
return false;
}return $use_thumbnail;
}, 10, 2 );
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
You must be logged in to reply to this ticket.