Hello,
We apologize for the issue you are facing with the automatic "WebPage" schema on your homepage. To remove the default "WebPage" schema added by Rank Math, you can use a code snippet in your theme’s functions.php file. Here’s how you can do it:
Code Snippet to Remove WebPage Schema
You can add the following code to your theme’s functions.php file:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( ! is_front_page() || ! isset( $data['@type'] ) ) {
return $data;
}
unset($data['@type']); // Remove the WebPage schema
return $data;
}, 99, 2);
How to Add the Snippet Code
- Navigate to WordPress Dashboard → Appearance → Theme File Editor (for Classic Theme) or WordPress Dashboard → Tools → Theme File Editor (for Block Theme).

- Locate the
functions.php file and add the above code snippet at the end of the file.
- Save the changes.
Important Note
Please be cautious when modifying your theme files, as incorrect changes can lead to issues on your site. It’s always a good idea to back up your site before making any changes.
If you have any further questions or need assistance, please feel free to reply to this ticket, and a human agent from our support team will assist you further.
Thank you for raising this concern!
Sources:
Configuring “Schema Markup” in Rank Math » Rank Math
Hello,
Let us know how this goes after applying the code we shared above.
Also, it seems that you’re using Rank Math PRO but the account you have used to open this ticket is the Rank Math free version.
Can you please search and forward a receipt from FastSpring.com or the email address you used to purchase so we can locate your account and verify it?
Looking forward to helping you.
No, this won’t help, since i want to use also the webpage schema. with the code above there will no webpage schema shown at all?
Hello,
You can remove the automatically generated WebPage Schema with the following filter:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if( isset($data['WebPage']) ) {
unset( $data['WebPage'] );
}
return $data;
}, 99, 2);
Beyond this, we won’t be able to provide further assistance with the custom Schema markup because that is only available in the PRO subscription and you no longer have one available on your account.
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.