As of the release of Yoast 11.0 on April 16th, 2019 you should use the below snippet to remove the Yoast Schema data:

add_filter( 'wpseo_json_ld_output', '__return_false' );



Yoast SEO is our favorite SEO plugin for WordPress.  It helps you customize all of your search engine data at the page, post and site levels easily.  One thing Yoast now includes is a generator for JSON-LD Schema Data.  It generates it on the fly and inserts into your webpage.  Schema Data is a great way to let search engines know what your page is about.

By default Yoast doesn’t include a setting to disable their Schema Data.  They do an OK job constructing it but some of you may want to disable it completely if you’re using another plugin or method to generate it.

Open your functions.php file from your child theme and drop in this little snipped of code the the last line.

function disable_yoast_schema_data($data){
	$data = array();
	return $data;
add_filter('wpseo_json_ld_output', 'disable_yoast_schema_data', 10, 1);

Save the file and refresh you page, the Yoast Schema Data has been removed from your site.

If you’re running WooCommerce keep in mind it also generates Schema Data.  We wrote an article on How to Remove the Woocommerce JSON/LD Structured Data Format.


Leave a Reply