Archived topic
WebPage - schema data
8 replies · Started by Anders Nielsen on September 17, 2019
I have yoast SEO plugin installed.
it creates a schema: WebPage
The type "WebPage" is also created by generatepress.
Can I use a filter: https://docs.generatepress.com/article/generate_body_itemtype/
Or any other function, to add the generatepress WebPage "text" into the yoast SEO plugin WebPage schema data?
Hi there,
If you're using the Yoast schema, then you'll want to disable the GP schema, which you can do with this filter:
add_filter( 'generate_schema_type', '__return_false' );
Let me know if you need more info :)
Hi Tom
I don't wan't to disable the generatepress Schema - it's great!
But I wan't to add it into the WebPage schema generated by yoast..
So I get all the "text attributes" under the the yoast WebPage schema.
That would make a killer SEO setup :-)
Yoast should get all the same schema that GeneratePress marks up by default - there shouldn't be anything additional you have to do. Which text attributes are missing?
all the "text" schema is missing on the yoast schema data.
There are two "#webpage", https://search.google.com/structured-data/testing-tool
but only one containing all the text schema (generatepress's schema)
Ah, I see. I'm not sure if it's possible to merge the two, unfortunately, as we use microdata and they use JSON+LD. You might be able to contact Yoast to see if there's a way to hook into their output to add the text items. I did some searching through their documentation but couldn't find anything.
ok, I had hope'ed it was possible :)
A plugin, like the little amp/menu plugin would be cool. (that creates the merge)
Btw.. just for info: https://www.searchenginejournal.com/google-structured-data-preference/297479/#close
Found the API - Anyone who can help with this?
https://developer.yoast.com/features/schema/api/#add-or-remove-graph-pieces
Looks like it's a filter so can be added using one of these methods:
PHP: https://docs.generatepress.com/article/adding-php/
You will need to check with their support for further information though.