Title: Schema.org classification problem from @type (ie: remove JSON from YOAST header)
Last modified: August 31, 2016

---

# Schema.org classification problem from @type (ie: remove JSON from YOAST header)

 *  Resolved [thezman](https://wordpress.org/support/users/thezman/)
 * (@thezman)
 * [10 years, 4 months ago](https://wordpress.org/support/topic/schemaorg-classification-problem/)
 * In the new YOAST plugin there is an awesome segment of code that is causing an
   unfortunate problem for advanced WP theme development.
 * Example—————————
 *     ```
       <script type='application/ld+json'>{"@context":"http:\/\/schema.org","@type":"WebSite","url":"http:\/\/www.mywebsite.com\/","name":"My Website","potentialAction":{"@type":"SearchAction","target":"http:\/\/www.mywebsite.com\/?s={search_term_string}","query-input":"required name=search_term_string"}}</script>
       <!-- / Yoast SEO plugin. -->
       ```
   
 * End example————————
 * And thats great, because most people dont know that add that.
 * **Why is this a problem?**
    If I classify my HTML element like so: `<html class
   ="no-js" lang="en-US" prefix="og: http://ogp.me/ns#" itemscope="itemscope" itemtype
   ="http://schema.org/Website" >`
 * As suggested by Schema.org specification there are now TWO (2) [Website itemtype]’
   s on the page, (one from Yoast and mine) preventing me from “properly” adding
   additional MICRODATA or RDFA data in the right place.
 * Possible solutions/suggestions:
    1. Allow a hook for developers to inject their own JSON into your JSON array
    2. Allow an option such as a checkbox to turn this OFF (preferred)
    3. Allow an option to add an itemid Microformat like so “@id”:”http:\/\/www.mywebsite.
       com\/”, so it can be identified as part of the same element.
 * Notes:
    This may not be a bug, it may be considered a “feature”, however, in 
   this case it is causing minor problems, enough that we must turn the plugin OFF
   in our case. We would like it to be ON.
 * [https://wordpress.org/plugins/wordpress-seo/](https://wordpress.org/plugins/wordpress-seo/)
 * —————- elaboration —————-
    Using the following: [https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/)
   Take the code snippets below and paste into Google’s structured data testing 
   tool ———————————————— ———————————————— **Problem example:**
 *     ```
       <html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns#" itemscope="itemscope" itemtype="http://schema.org/WebSite" >
       <head><script type='application/ld+json'>{"@context":"http:\/\/schema.org","@type":"WebSite","url":"http:\/\/www.mywebsite.com\/","name":"My Website","potentialAction":{"@type":"SearchAction","target":"http:\/\/www.mywebsite.com\/?s={search_term_string}","query-input":"required name=search_term_string"}}</script></head><body>
       <p itemprop="about"> This <span itemprop="name">website</span> (<span itemprop="url">http://www.mywebsite.com</span>) is about widgets and womps </p><p> This website is enabled with
       <span itemprop="accessibilityAPI">alternativeText</span>
       and <span itemprop="accessibilityAPI">audioDescription</span>
       for the blind.</p>
       <p>Copyright: <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Person"><span itemprop="name" class="review_author">Joe Smith</span></span></p>
       </body></html>
       ```
   
 * Notice the 2 WebSite specifications lacking an [@id](https://wordpress.org/support/users/id/).
   
   There are not 2 websites, there is only ONE in this case. ———————————————— ————————————————**
   PROPOSED SOLUTION: (sloppy) **
 *     ```
       <html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns#" itemscope="itemscope" itemtype="http://schema.org/WebSite" itemid="http://www.mywebsite.com/" >
       <head><script type='application/ld+json'>{"@context":"http:\/\/schema.org","@id":"http:\/\/www.mywebsite.com\/","@type":"WebSite","url":"http:\/\/www.mywebsite.com\/","name":"My Website","potentialAction":{"@type":"SearchAction","target":"http:\/\/www.mywebsite.com\/?s={search_term_string}","query-input":"required name=search_term_string"}}</script></head><body><p itemprop="about"> This <span itemprop="name">MyWebsite</span> (<span itemprop="url">http://www.mywebsite.com</span>) is about widgets and womps </p><p> This website is enabled with
       <span itemprop="accessibilityAPI">alternativeText</span>
       and <span itemprop="accessibilityAPI">audioDescription</span>
       for the blind.</p><p>Copyright: <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Person"><span itemprop="name" class="review_author">Joe Smith</span></span></p>
       </body>
       </html>
       ```
   
 * Technically, that is STILL a problem, notice how there are still 2 websites, (
   but at least they have the same itemid)…
 * ————————————————
    ———————————————— **PROPOSED SOLUTION: (best, preferred) **
 *     ```
       <html class="no-js" lang="en-US" prefix="og: http://ogp.me/ns#" itemscope="itemscope" itemtype="http://schema.org/WebSite" itemid="http://www.mywebsite.com/" >
       <head></head><body>
       <div><link itemprop="url" href="http://www.mywebsite.com/"/>
           <form itemprop="potentialAction" itemscope itemtype="http://schema.org/SearchAction">
                 <meta itemprop="target" content="http://www.mywebsite.com/search?q={query}"/>
             <input itemprop="query-input" type="text" name="query"/>
             <input type="submit"/>
           </form>
       </div>
       <p itemprop="about"> This <span itemprop="name">WebSite.com</span> is about widgets and womps </p>
       <p> This website is enabled with
       <span itemprop="accessibilityAPI">alternativeText</span>
       and <span itemprop="accessibilityAPI">audioDescription</span>
       for the blind.</p>
       <p>Copyright: <span itemprop="copyrightHolder" itemscope itemtype="http://schema.org/Person"><span itemprop="name" class="review_author">Joe Smith</span></span></p>
       </body>
       </html>
       ```
   
 * **Why this is important to us:**
    A: there is 1 (one single)- [http://schema.org/WebSite](http://schema.org/WebSite)
   B: there is 1 (one single)- itemid ect… C: The rest of the schema is left to 
   the developer D: will be RDFa or Microformat, not JSON (which is limited and 
   technically “hidden data”)
 * Thank you for your consideration in this matter.

The topic ‘Schema.org classification problem from @type (ie: remove JSON from YOAST
header)’ is closed to new replies.

 * ![](https://ps.w.org/wordpress-seo/assets/icon-256x256.gif?rev=3419908)
 * [Yoast SEO - Advanced SEO with real-time guidance and built-in AI](https://wordpress.org/plugins/wordpress-seo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-seo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-seo/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-seo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-seo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-seo/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [thezman](https://wordpress.org/support/users/thezman/)
 * Last activity: [10 years, 4 months ago](https://wordpress.org/support/topic/schemaorg-classification-problem/)
 * Status: resolved