Aha, I did look there Mike but I couldn’t find it. Anyhow, having looked a little deeper, it appears it’s due to my theme editor being in the child theme. Selecting the parent file creates the possibility of editing this. Thank you.
One query – on the Structured Data test, my ‘Organization’ receives the all good. It’s only the WebSite which features the errors (being the search functionality).
Would the error on the WebSite section prohibit the Organization section from working correctly in the SERP’s? i.e. my Organization section contains my social links – would these work regardless of the error in the WebSite section?
I ask because that’s primarily what I want to achieve. If they should be working regardless of the WebSite section errors, I would rather leave the functions.php file alone!
Thanks guys.
May I kindly ask if anyone has any idea for the above please?
Thanks!
I found the issue and the change needed in the plugin in order to make it validate properly.
However, just know that this change will be overwritten once an update is made. Hopefully the guys over at Yoast will make this change in the next update.
in class-json-ld.php:
public function website() {
$this->data = array(
'@context' => 'http://schema.org/',
'@type' => 'WebSite',
'url' => $this->get_home_url(),
'name' => $this->get_website_name(),
);
$this->add_alternate_name();
$this->internal_search_section();
$this->output( 'website' );
}
needs to be changed to
public function website() {
$this->data = array(
'@context' => 'http://schema.org/True',
'@type' => 'WebSite',
'url' => $this->get_home_url(),
'name' => $this->get_website_name(),
);
$this->add_alternate_name();
$this->internal_search_section();
$this->output( 'website' );
}
Basically, the Schema.org link just needs to have /True added to the end of it. I tried this in the structured data tool validator and it seemed to work just fine.