- This topic has 11 replies, 2 voices, and was last updated 1 year, 4 months ago by Tom.
June 19, 2019 at 4:47 am #934404Amit
I really don’t know as this is about Generatepress or not, but I would really appreciate if you can have a glance on this as I am unable to find a solution to this.
The following are the 2 pages I am getting error on to-
– https://www.friedcoffee.com/nespresso=pods/June 19, 2019 at 5:42 am #934484TomLead DeveloperLead DeveloperJune 19, 2019 at 5:51 am #934502Amit
No proper error, when I checked in structured data testing tool, the following were the errors-
‘The attribute publisher.itemtype has an invalid value.’
‘A value for the name field is required.’June 19, 2019 at 6:06 am #934517TomLead DeveloperLead Developer
Ah, that’s because you’re using Yoast JSON+LD to set the post as an “Article”.
If you run your page through this tool, you’ll see the “Article” type requires additional information on the page: https://search.google.com/structured-data/testing-tool
You’ll also want to remove the GP schema if you’re using JSON+LD from Yoast:
add_filter( 'generate_schema_type', '__return_false' );June 20, 2019 at 3:19 am #935570Amit
Hey Tom, I don’t know technically about these things. Can you suggest what is better for site SEO and how to do it?June 20, 2019 at 6:25 am #935748Amit
I even checked the normal post page in the structured data testing tool and it’s giving 12 errors and 4 warnings. It’s getting me worried now!June 20, 2019 at 8:29 am #936052TomLead DeveloperLead Developer
Did you try adding the filter I provided? There’s no need for the GP schema if you’re using JSON+LD from Yoast.
Alternatively, you can turn off the Yoast option and keep the GP schema.June 22, 2019 at 8:45 pm #938290Amit
I inserted your given function, but still, 1 error is left! What to do about that?June 23, 2019 at 7:41 am #938686TomLead DeveloperLead Developer
That’s an issue with the JSON+LD you’re using. You’ve set the content type to Article, so the author attribute needs a “name”. It should be a setting in the plugin you’re using to output JSON+LD.June 23, 2019 at 8:18 pm #939085Amit
There is no setting to change the article type in the Yoast plugin. Also, if it’s not the type ‘article’, what it should be?June 23, 2019 at 8:35 pm #939090Amit
I again changed it to person, and now errors are gone! Don’t know what exactly did this but now they are gone…June 24, 2019 at 8:59 am #939725TomLead DeveloperLead Developer
It might be worth checking with Yoast support to see how you can define the author name. That way you could keep it as an “Article”.
- You must be logged in to reply to this topic.