• Resolved sergey2020

    (@sergey2020)


    Good afternoon,
    I ask you to tell me how you can disable Schema in Yoast SEO, since I use a special Schema plugin.

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Support Suwash

    (@suascat_wp)

    Hi @sergey2020,

    To disable Yoast SEO Schema entirely, please use the following filter code on your functions.php file:

    add_filter( 'wpseo_json_ld_output', '__return_false' );

    We have full resources guide on developer filters here: https://developer.yoast.com/features/schema/api/

    Thread Starter sergey2020

    (@sergey2020)

    Suwash Kunwar
    Thanks!

    Hi! Could you advise, please? I have added the peace of code to the Function.php file
    as described. Then I take the URL, go to the Schema markup testing tool and can still see the Yoast Schema Markup added. What I do wrong and how to fix it?

    Would really appreciate your help guys!

    Kind regards,
    Janna

    Ya, I am also facing same issue in spite of adding the filter code

    In order to avoid theme updates erasing the filter code for disabling Yoast schema, is it best to create a custom plugin for this code?

    • This reply was modified 3 years, 2 months ago by tark94.

    You don’t need to create a new custom plugin to add a single line of code to your Functions.php file so long as you have a Child Theme installed (as you should – if you do not you need to backtrack and get it done immediately)
    That being said, I am having a similar issue within my Woocommerce product pages “Type” being identified as “Article”.
    I have been to the Admin/Product page “edit page” to address this issue and changed the “Schema Page Type” to “Item” cleared and purged all the site and server caches, reloaded the page and viewed the source code to see NO change. See below.
    I am thinking it’s probably easier to just remove the Yoast Schema completely as I cannot believe this has not been addressed in the past and even more so that an option to add/remove the schema as Active or Inactive hasn’t been built into the plugin already ??? For as much as you “ding” the ppl for the Pro version on an annual basis one might think this would have been addressed. I don’t know. Ok, that’s just my 2 cents – I really do appreciate the work put into providing a free version to make some of the tedious SEO requirements accessible and easy to administer, and as a former web dev / seo guy I have always backed y’all in the past when working salary or on contract. Any how, can you please update us if there is a better snippet for our Functions.php file that will fix this issue? Or maybe there is an Active/Inactive option built-in and I just haven’t found it yet ???
    Thanks in advance, “K”

    <!-- This site is optimized with the Yoast SEO plugin v17.9 - https://yoast.com/wordpress/plugins/seo/ -->
    	<title>Broad Spectrum 5000mg CBD Oil Tincture &raquo; NanoPlanet CBD</title>
    	<meta name="description" content="Our 5000mg Broad Spectrum CBD Tincture with an MCT carrier oil for better absorption and overall better shelf life is derived using a best practices, clean Co2 extraction. Broad Spectrum CBD contains the entire hemp plant minus the THC. If you have concerns that THC is not for you, this is the tincture you're looking for!" />
    	<link rel="canonical" href="https://nanoplanetcbd.com/cbdshop/broad-spectrum-5000mg-cbd-tincture/" />
    	<meta property="og:locale" content="en_US" />
    	<meta property="og:type" content="article" />
    	<meta property="og:title" content="Broad Spectrum 5000mg CBD Oil Tincture &raquo; NanoPlanet CBD" />
    	<meta property="og:description" content="Our 5000mg Broad Spectrum CBD Tincture with an MCT carrier oil for better absorption and overall better shelf life is derived using a best practices, clean Co2 extraction. Broad Spectrum CBD contains the entire hemp plant minus the THC. If you have concerns that THC is not for you, this is the tincture you're looking for!" />
    	<meta property="og:url" content="https://nanoplanetcbd.com/cbdshop/broad-spectrum-5000mg-cbd-tincture/" />
    	<meta property="og:site_name" content="NanoPlanet CBD" />
    	<meta property="article:publisher" content="https://www.facebook.com/4NanoPlanetCBD/" />
    	<meta property="article:modified_time" content="2022-01-23T21:43:21+00:00" />
    	<meta property="og:image" content="https://nanoplanetcbd.com/wp-content/uploads/2021/08/bso-5000mg.jpg" />
    	<meta property="og:image:width" content="450" />
    	<meta property="og:image:height" content="600" />
    	<meta property="og:image:type" content="image/jpeg" />
    	<meta name="twitter:card" content="summary_large_image" />
    	<meta name="twitter:label1" content="Est. reading time" />
    	<meta name="twitter:data1" content="1 minute" />
    	<!-- / Yoast SEO plugin. -->
    Also, (taken code from the Yoast developers recommendations to remove the Yoast schema) is a recommendation to use the Functions.php in your Child Theme and Add this line: add_filter( 'wpseo_json_ld_output', '__return_false' );
    
    However, after purging the cache and rechecking the code I get the same result as above. I am assuming this is all Yoast output since it is wrapped in the Yoast SEO plugin signature. 
    
    Switching tactics here and now adding yet one more plugin to my already crowded list of website plugins (which we all know puts us at risk) to remove the Yoast schema. I honestly think this should be addressed by Yoast - but OK. For the others here the name of the plugin is appropriately: REMOVE SCHEMA (not current with my version of WordPress as of 01-23-2022) - - - I'll come back and let y'all know how it goes...
    • This reply was modified 2 years, 9 months ago by ksteele36.

    Why don’t you just put a button on the Features tab to disable this???
    We use the Schema & Structured Data for WP & AMP plugin which does a much better job than the meager job this does for schema. So many users use dedicated plugins for this. Shouldn’t have to add code to functions just to disable this.

    Web Guys

    (@webinfinitynz)

    +1 to ask for a feature to add a tick box in Yoast to disable all Yoast Schema. I used another dedicate Schema plugin.

    nomana1

    (@nomana1)

    I have site named postredi.com i am also facing the same issue. i am not sure about addig code in the fucntions.php file will not make any issue in site structure. Can any one of you tell me about this. And one more thing if i deactivate the yoast seo plugin and then again activate it. will this error still exists or it will be removed

    • This reply was modified 2 years ago by nomana1.

    @suascat_wp you guys could just as easily add a single checkbox option in plugin’s settings to control this too, you know…

    For the love of god, make these able to toggle. We want to use the opengraph for social media, but not the others! Pointing us to the API tools doesn’t help. If we could code, we’d be making our own plugins.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘How to disable Schema in Yoast SEO?’ is closed to new replies.