Archived topic
Schema CreativeWork and SiteNavigationElement
9 replies · Started by Ivan on January 27, 2021
Hi,
When doing the structured data test with the Google tool, a total of 4 types of Schema appear, the two created by me (WebPage and LocalBusiness.) + CreativeWork (inside there is a nonsense text) and SiteNavigationElement.
I have read that they are from GeneratePress. Are important? Do they affect something?
The website is https://emcolimpiezas.es
Thank you
Hi there,
They can help Google understand your content better. However, in most cases, you're better off using an SEO plugin with JSON-LD integration.
If you want to remove the structured data, you can do so with a simple filter:
add_filter( 'generate_schema_type', '__return_false' );
Hope this helps! :)
Hi Tom,
So do you recommend leaving them as they are? I have two more schemas (WebPage and LocalBusiness).
"You're better off using an SEO plugin with JSON-LD" you mean a plugin like Yoast SEO (I already have this plugin). Is it better to use only said plugin?
“You’re better off using an SEO plugin with JSON-LD” you mean a plugin like Yoast SEO (I already have this plugin). Is it better to use only said plugin?
That is what Tom is saying :)
ok, but it is not clear to me, it is better to remove the Schemas from GeneratePress or it is better to leave them.
In case of removing them, where do I have to put the indicated filter?
Hi there,
if you're adding your own scheme then its probably best to remove the Themes.
This article explains how to add the PHP Snippet that Tom provided:
I have asked Yoast SEO support and they have told me that I can leave the SiteNavigationElement as it won't conflict with. Yoast SEO generated schema markup
I have also been told that I have to remove CreativeWork as WebPage is more spesific.
My question is, how can I delete only the CreativeWork schema?
You can try this:
add_filter( 'generate_article_microdata', '__return_empty_string' );
Hi,
Done! and sorry for answering now ..
Thanks,
No problem! :)