Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
Please try applying the following filter on your site to remove any other schemas generated by Rank Math from your site except FAQ Schema:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( isset($data['faqs'] ) && isset($data['WebPage']) ) {
$data['faqs'] = [
'@type' => 'FAQPage', $data['faqs']
];
return $data['faqs'];
}
else{
return [];
}
}, 99, 2);
If the above one doesn’t work for you, you may apply the following filter instead:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
unset($data['WebPage']);
unset($data['WebSite']);
unset($data['ImageObject']);
unset($data['primaryImage']);
unset($data['publisher']);
unset($data['place']);
return $data;
}, 99, 2);
Here’s how you can add filters/hooks to your WordPress site:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how it goes. 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.