Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
You can set the default schema to None for your posts types/pages on your WordPress dashboard > Rank Math > Titles & Meta
I hope that helps.
Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.
Same issue face i add schema in this page but not visible. Anyone help me
Hello,
To remove the WebPage schema only from the homepage, please add the below code to the website:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if(!is_front_page()) return $data;
unset($data['WebPage']);
return $data;
}, 99, 2);
You can follow this guide to add the code:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
Let us know how that goes.
Thank you.
Hello,
I am happy it helped you. Let us know if the previous solution resolves your issue.
In the meantime, please don’t hesitate to let us know if you need our assistance with anything else.
Doing this would remove the schema from all the pages. I would only like to remove WebPage schema from the homepage. Is there a code snippet you could give me that would accomplish that?
Hello,
The code I shared would remove the WebPage schema only from the homepage.
This condition in the code checks for the homepage:
if(!is_front_page())
If it is not the homepage/front page, then the code would return all the schema and if that’s that’s not the case, then the code would return the schema after removing the WebPage schema.
Let us know how that goes.
Thank you.
I added the code snippet and now it seems to have made the problem worse. I only want the Local Business Schema to show. There seemed to be more schema added somehow I took a screenshot of the Schema validator. https://paste.pics/FV401
Hello,
I checked the source of your website and the LocalBusiness and hentry schema is added by another plugin/theme. Please have a look at this screencast for a quick reference: https://i.rankmath.com/ps6zeB
The WebPage schema is already removed from the website.
Please follow this troubleshooting guide to determine which plugin/theme is adding the additional schemas: https://rankmath.com/kb/check-plugin-conflicts/
Once found, you can disable the schema feature of that plugin/theme to fix the issue.
Let us know how that goes.
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.