I Don’t Want Automatic Incoming Schema Code

[ad_1]

For example, the code below removes the organization schema from all pages except the home page.

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

I need code to delete organization, website, web page schema from all pages.

Hello @sizinajans,

Thank you for contacting the support.

Please use the filter given below to remove the default Schemas added by our plugin:

add_filter( 'rank_math/json_ld', function( $data, $jsonld ) {
unset($data['publisher']);
unset($data['WebSite']);
unset($data['WebPage']);
return $data;
}, 99, 2);

Here is how to add a filter to your site:

Hope this helps. Let us know if you need any other assistance.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer