Hello,
Thank you for contacting Rank Math today.
You can easily remove the Rank Math schema by making use of the following filter on your theme’s functions.php file:
/**
* Code to remove json+ld data
*
*/
add_action( 'rank_math/head', function() {
global $wp_filter;
if ( isset( $wp_filter["rank_math/json_ld"] ) ) {
unset( $wp_filter["rank_math/json_ld"] );
}
});
Next, you can generate your custom schema and add it to head section of your site by using the following filter:
/**
* Collect data to output in JSON-LD.
*
* @param array $unsigned An array of data to output in json-ld.
* @param JsonLD $unsigned JsonLD instance.
*/
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
return [];
}, 10, 2);
Looking forward to helping you. Thank you.
Hello,
Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.
If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.
Thank you.