Title: Structered data &#8211; WebSite error
Last modified: August 30, 2016

---

# Structered data – WebSite error

 *  Resolved [outrospective](https://wordpress.org/support/users/outrospective/)
 * (@outrospective)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/structered-data-website-error/)
 * Hello,
 * First of all thanks for the plugin. I’m using it for some time already and are
   quite happy.
 * WordPress SEO – Version 2.1.1
 * Lately, I receive the following error in the google structured data testing tool(
   [https://developers.google.com/structured-data/testing-tool/](https://developers.google.com/structured-data/testing-tool/))
 * query-input [PropertyValueSpecification]:
    : [http://schema.org/True](http://schema.org/True)
   The property is not recognized by Google for an object of type PropertyValueSpecification.
 * query-input [PropertyValueSpecification]:
    valueName: missing and required A 
   value for the valueName field is required. Required by: Sitelinks Search Box
 * Would be cool if this can fixed.
 * Thanks
 * [https://wordpress.org/plugins/wordpress-seo/](https://wordpress.org/plugins/wordpress-seo/)

Viewing 15 replies - 16 through 30 (of 33 total)

[←](https://wordpress.org/support/topic/structered-data-website-error/?output_format=md)
[1](https://wordpress.org/support/topic/structered-data-website-error/?output_format=md)
2 [3](https://wordpress.org/support/topic/structered-data-website-error/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/structered-data-website-error/page/3/?output_format=md)

 *  [jsearles](https://wordpress.org/support/users/jsearles/)
 * (@jsearles)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230340)
 * I forgot to mention that I am using the Header and Footer Plugin and inserted
   the script for Google’s SiteLink Search Box at the bottom of every Page & Post
   and this script in the header of every page:
 *     ```
       <script type="application/ld+json">
       {
         "@context": "http://schema.org/true",
           "@type": "WebSite",
         "url": "https://www.yoursite.com/",
         "potentialAction": {
           "@type": "SearchAction",
           "target": "http://www.yoursite.com/search?q={search_term_string}",
           "query-input":"required name=search_term_string"
         }
       }
       </script>
       ```
   
 * My site is [JohnSearles.com](http://www.johnsearles.com/) so you can see how 
   the SDTT marks my site.
 * Yes, the SiteLinks Search Box Plugin is now part of Yoast’s WordPress-SEO and
   has the same error as the Yoast does.
 *  [jstidea](https://wordpress.org/support/users/jstidea/)
 * (@jstidea)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230351)
 * Hi [@jsearles](https://wordpress.org/support/users/jsearles/)
 * I am also facing the same problem with search box schema code. I fixed the error
   in code with your suggested code. But now I want to add this to my website. As
   you mentioned in your answer to add code
 * > OK – I tried to comment out lines 217 through 242 and that shut down my site.
   > So I reinstalled WordPress-SEO to put the class-json-ld.php back to it’s original
   > status.
 * Then I added this code to my functions.php in my child theme
 * add_filter( ‘wpseo_json_ld_output’, ‘__return_false’ );
 * Success! No errors messages now.
    I need your help to add code.
 * I am using eleven40 child theme and Genesis. But I unable to find the existing
   code for application/ld+json. Please can you help me where I can find and edit
   this code
 * Thank You
 *  [jsearles](https://wordpress.org/support/users/jsearles/)
 * (@jsearles)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230358)
 * @jsidea – I am not a WordPress professional, just a person with a little coding
   experience who is trying to get my sites to report well in Google’s Webmaster
   Tools. GWT told me I didn’t have any Rich Snippets, so I’ve been working on that.
   Apparently it’s important to Google. Be sure that you are registered with GWT.
 * Here are some links for you;
 * [Header-Footer Plugin](https://wordpress.org/plugins/header-footer/)
 * [Google’s Structured Data Overview](https://developers.google.com/structured-data/slsb-overview?)
 * [JSON-LD Playground](http://json-ld.org/playground/index.html)
 * [A page with other GWT Tool Links (works if you have a site registered)](https://www.google.com/webmasters/tools/other-links-site)
 * Here is the code for the Website and Search Term String
 *     ```
       <script type="application/ld+json">
       {
         "@context": "http://schema.org/true",
           "@type": "WebSite",
         "url": "https://www.yoursite.com/",
         "potentialAction": {
           "@type": "SearchAction",
           "target": "http://www.yoursite.com/search?q={search_term_string}",
           "query-input":"required name=search_term_string"
         }
       }
       </script>
       ```
   
 * Good luck. There are also plugins to add scripts to particular pages that could
   be useful for you.
 *  [jstidea](https://wordpress.org/support/users/jstidea/)
 * (@jstidea)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230363)
 * [@jsearles](https://wordpress.org/support/users/jsearles/) – Thanks for your 
   help!
 *  [mateuszx3](https://wordpress.org/support/users/mateuszx3/)
 * (@mateuszx3)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230364)
 * I find the isuue ! 🙂
 * You must go to plugins->editor -> WordPress SEO ->
    find wordpress-seo/fronted/
   class-json-ld.php
 * And you must to add /true to schema.org
 *     ```
       public function website() {
       		$this->data = array(
       			'@context' => 'http://schema.org',
       			'@type'    => 'WebSite',
       			'url'      => $this->get_home_url(),
       			'name'     => $this->get_website_name(),
       		);
       ```
   
 *     ```
       public function website() {
       		$this->data = array(
       			'@context' => 'http://schema.org/true',
       			'@type'    => 'WebSite',
       			'url'      => $this->get_home_url(),
       			'name'     => $this->get_website_name(),
       		);
       ```
   
 * If doesn’t work
    {search_term_string} must be the same in ‘query-input’ and in?
   s=
 *     ```
       $search_url = apply_filters( 'wpseo_json_ld_search_url', $this->get_home_url() . '?s={search_term_string}' );
   
       			$this->data['potentialAction'] = array(
       				'@type'       => 'SearchAction',
       				'target'      => $search_url,
       				'query-input' => 'required name=search_term_string',
       			);
       		}
       	}
       ```
   
 * Sorry if something was incomprehensible, becouse I’m from Poland
 *  Thread Starter [outrospective](https://wordpress.org/support/users/outrospective/)
 * (@outrospective)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230365)
 * Thanka [@mateuszx3](https://wordpress.org/support/users/mateuszx3/) and everyone
   else who contributed to solve the issue. Your suggested fix (add /true to schema.
   org in wordpress-seo/fronted/class-json-ld.php) was successful!
 * [@tacoverdo](https://wordpress.org/support/users/tacoverdo/) (Plugin Author).
   Pls consider this fix for the next plugin version, as else things will result
   in an error again.
 * Cheers
 *  [jstidea](https://wordpress.org/support/users/jstidea/)
 * (@jstidea)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230366)
 * Thanks to all friends! I have fixed the code successfully now there is no error.
 *  [mateuszx3](https://wordpress.org/support/users/mateuszx3/)
 * (@mateuszx3)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230367)
 * no problem 🙂 set solved
 *  [krazygyal](https://wordpress.org/support/users/krazygyal/)
 * (@krazygyal)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230369)
 * Thanks [@mateuszx3](https://wordpress.org/support/users/mateuszx3/)
    It worked
   for me too.
 *  [jchan0806](https://wordpress.org/support/users/jchan0806/)
 * (@jchan0806)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230376)
 * Hi, I’m trying to fix this error on the wordpress-seo/frontend/class-json-ld.
   php file, but it’s “inactive”. I have the plugin activated. It looks like all
   my frontend php files are inactive as well.
 * How do I activate this? It’s preventing me from updating the file. Thanks!
 *  [mateuszx3](https://wordpress.org/support/users/mateuszx3/)
 * (@mateuszx3)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230379)
 * It’s no matter
    When I do something in this file or another in editor it’s inactive
   too but work’ s it not try by ftp
 *  [jchan0806](https://wordpress.org/support/users/jchan0806/)
 * (@jchan0806)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230380)
 * thank you mateuszx3! That worked!
 *  [tomjuxta](https://wordpress.org/support/users/tomjuxta/)
 * (@tomjuxta)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230382)
 * Hi [@mateuszx3](https://wordpress.org/support/users/mateuszx3/)
 * Thanks for your input – unfortunately it hasn’t worked for my site! The structured
   data test is returning the same 2 errors for WebSite – just now it says [http://schema.org/True](http://schema.org/True)
 * I checked the {search_term_string} also. Both ‘query-input’ and ‘?s=’ were listed
   as {search_term} so I changed this to {search_term_string} for both but still
   the error remains.
 * May I kindly ask if you know why please? My URL is [http://juxtalegal.com](http://juxtalegal.com)
 * Thanks.
 *  [tomjuxta](https://wordpress.org/support/users/tomjuxta/)
 * (@tomjuxta)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230383)
 * I’ve just looked into this a little more.
 * If I copy and paste the source code into the Structured Data Testing Tool, all
   is fine. However, if I fetch the URL the old source code shows. Is this just 
   a case of Google still reading the old code and so will update next time Google
   crawls my site?
 * If so – Thank you [@mateuszx3](https://wordpress.org/support/users/mateuszx3/)!
   Problem solved (I think).
 *  [mateuszx3](https://wordpress.org/support/users/mateuszx3/)
 * (@mateuszx3)
 * [10 years, 10 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/2/#post-6230385)
 * If not work set only search_term and tell me what is your search engine it is
   from theme or from Google

Viewing 15 replies - 16 through 30 (of 33 total)

[←](https://wordpress.org/support/topic/structered-data-website-error/?output_format=md)
[1](https://wordpress.org/support/topic/structered-data-website-error/?output_format=md)
2 [3](https://wordpress.org/support/topic/structered-data-website-error/page/3/?output_format=md)
[→](https://wordpress.org/support/topic/structered-data-website-error/page/3/?output_format=md)

The topic ‘Structered data – WebSite error’ 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/)

 * 33 replies
 * 14 participants
 * Last reply from: [sbahjaoui](https://wordpress.org/support/users/sbahjaoui/)
 * Last activity: [10 years, 6 months ago](https://wordpress.org/support/topic/structered-data-website-error/page/3/#post-6230465)
 * Status: resolved