🔥 Spring Sale! Get 28% OFF + 2x Benefits 🌸

LIMITED TIME OFFER!
  • 02 days
  • 15 hr
  • 30 min
  • 44 sec
  • Remove Organization Schema from Your Website

    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.

    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);

    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.

    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.

    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).

    Navigate to Theme File Editor

    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.

    Choose the rank-math.php file

    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…

    Still not using Rank Math?

    Setup takes less than 5 minutes including the import from your old SEO Plugin!

    Learn more about the PRO Version

    Still need help?

    ?

    Submit Your Question

    Please give us the details, our support team will get back to you.

    Open Ticket

    Related Articles