In order to disable Yoast SEO generated JSON+LD only on custom post types, you’ll need to implement custom code on your end using the following filter.
wpseo_json_ld_output
Unfortunately, we’re unable to provide the exact custom code that you’d need to implement on your site as this depends on your custom post types.
Closed due to inactivity.
Thank you for your help,
Currently I remove the JSON-LD schema markup on all the site with the following code.
function bybe_remove_yoast_json($data){
$data = array();
return $data;
}
add_filter('wpseo_json_ld_output', 'bybe_remove_yoast_json', 10, 1);
I would just remove it from the custom post type “newsletter” (it’s the name of my custom post type). If you can provide the exact custom code it would be great !
Thanks