You can exclude the Schema JSON-LD markup from specific post types by using the following filter.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
add_filter( 'wpsso_json_prop_https_schema_org_graph', 'exclude_schema_graph_by_post_type', 10, 5 ); function exclude_schema_graph_by_post_type( $prop_data, $mod, $mt_og, $page_type_id, $is_main ) { if ( 'a-post-type-name' === $mod[ 'post_type' ] ) { return __return_empty_array; } return $prop_data; } |