Site logo

Archived topic

Code error

16 replies · Started by Simone on July 22, 2021

Viewing posts 1–15 of 17

Hi

I've just changed my theme to GP theme and today when I wanted to submit my sitemap in Google Console, there were warning errors. I've contacted my hosting company and they checked. They then told me to contact the author of the theme to resolve the issues. https://www.screencast.com/t/44nPaaKJqNN https://www.screencast.com/t/oJHSqPkXO

Here is the answer of my hosting company: Those are theme-related errors. You will have to contact your theme provider and ask them to look into it as that will certainly help.
Please refer to the URL:
https://support.google.com/webmasters/thread/12441209/missing-field-errors?hl=en

I would love some help. Thank you!

Hi there,

Are you using a Plugin for generating Structured Data (JSON-LD)?

Hi David,

No, I am not. Should I? If so, where can I download it? Is it free?

Hi again,

I looked in the plugin section and the plugin "JSON-LD" doesn't show up.
Is it under another name?

Its either that plugin or your All in One SEO plugin thats setting the itemType to Product.
Try disabling each plugin and see if the error clears then you will know which one is doing that.

Sorry, David. I think there is a miss understanding:)

I thought I had to download the plugin you sent me "generating Structured Data (JSON-LD)"

Should I leave it now? I've never used this plugin before. So those errors are not from the "generating Structured Data (JSON-LD)"

Can I delete it now?

And what should I check after that on my All in One Seo plugin?

I've never had any issues with my ALL in One Seo plugin until I changed the theme. Don't get me wrong. I love the GP theme. But I need to fix this issue.

You can remove the plugin you installed after my reply.

The errors are being generated because another plugin is creating structured data ( JSON-LD ) for your site.
I would begin by asking All In One SEO if there plugin is doing that - and if it is, how you should set it up for your Products.

If you want to use those plugins to generate structured data then you won't need the Schema that GP creates. Which you can remove by adding this PHP Snippet to your site:

add_filter( 'generate_schema_type', '__return_false' );

Thank you, David!

Is it indispensable to put this code? Or I can live without it?:)

I use only the simple version of One SEO, not the PRo version. So I can't ask any questions to the support. However, I didn't have this issue with the other theme. This means it doesn't come from the ALL In One SEO plugin.

This code:

add_filter( 'generate_schema_type', '__return_false' );

You should add that to remove the themes schema when you're using a plugin that adds structured data.

Hi David, thank you again.

I don't use any plugin that adds structured data. Should I if I want to resolve my issue?

Yes, if you want Google to gather that data then you will need a structured data plugin that supports JSON-LD - like this one:

https://wordpress.org/plugins/wpsso-schema-json-ld/

But i would check with your SEO plugin author if it provides this feature.

Whichever plugin you use - you will need to set that up correctly to output the missing data. The plugin author should be able to advise on that.

And if you DO want to use JSON LD. Then you should disable the Themes schema using the snippet i provided here:

https://generatepress.com/forums/topic/code-error-2/#post-1866375

Hi David

Thank you again.

I've checked in my All in One Seo plugin and I took a screenshot because I am not sure if this is what you talk about. Is that the structure data? https://www.screencast.com/t/T0EdqhI1uyOa

Hi David, I've checked, and Yes, the All In One Seo plugin support structured data markup on Posts, Pages, Categories, Tags, and the search results page. So I don't need to use the plugin "JSON-LD". Should I ignore the issue of Google Console reports?
I really don't know what to do here.

Check the issue with All In One SEO - as that is your only plugin that is generating JSON-LD - they should be able to advise how to set it up correctly.

If you don't fix the 'error' then it simply means that Google won't display Products within the Google Shop Search Results.

This archived topic is closed to new replies.