The Organization Schema Markup is a great way to help you generate brand signals that can further help make your Knowledge Graph entities and website snippet presence appear more frequently on the search engine results pages (SERPS).
But if you prefer to remove the Organization Schema from your website, then we’ll walk you through the steps in the knowledgebase article.
Table Of Contents
1 Remove Organisation Schema from All Pages Except Homepage
You can use the below code to remove the Organization Schema from all pages except the homepage:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( is_front_page() || ! isset( $data['publisher'] ) ) {
return $data;
} unset( $data['publisher'] );
unset( $data['place'] ); return $data;
}, 99, 2);
2 Remove Organisation Schema from the Homepage
You can use the below code to remove the Organization Schema just from the homepage:
add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
if ( ! is_front_page() || ! isset( $data['publisher'] ) ) {
return $data;
} unset( $data['publisher'] );
unset( $data['place'] ); return $data;
}, 99, 2);
Note: All these entities are interconnected and we do not recommend removing any one entity from the Schema. Only developers who have sound knowledge of what exactly they are doing should attempt this. Also, it’s not recommended to remove the global entities as it could break the Schema structure.
3 How to Add the Snippet Code
We recommend adding the above-mentioned code snippets to your theme’s rank-math.php file. Adding it to your parent theme could mean that you’ll lose all changes upon updating when your theme developer releases an update.
3.1 Navigate to Theme File Editor
First of all, navigate to WordPress Dashboard → Appearance → Theme File Editor (for Classic Theme) as shown below or WordPress Dashboard → Tools → Theme File Editor (for Block Theme).
3.2 Edit Your rank-math.php File
To edit your theme’s rank-math.php click on the rank-math.php file from the right sidebar that lists down all the files in your child theme.
Then, add your snippet code to the field as shown above and click “Update File“.
And, that’s it! We hope this tutorial was helpful in adding code snippets to your WordPress site. In case, if you still have any questions about removing Organization Schema from your website – you’re always more than welcome to contact our dedicated support team. They are available 24/7, 365 days a year…