- This topic has 31 replies, 3 voices, and was last updated 6 years, 4 months ago by
Tom.
-
AuthorPosts
-
November 17, 2018 at 8:30 am #729818
dassana
hi
i want to remove the schema created by generatepress theme. basically i just want the recipe schema and not the other schema. is there a way i can remove the other schema types like hcard, comment, wpsidebar, creative work, navigation element, person and hatom.
November 17, 2018 at 5:51 pm #729979Tom
Lead DeveloperLead DeveloperHi there,
You’d have to install 2.2, which is currently a release candidate: https://generatepress.com/generatepress-2-2/
Then you can add this function:
add_filter( 'generate_schema_type', function() { return ''; } );November 17, 2018 at 11:14 pm #730055dassana
thanks tom. i have upgraded generatepress to 2.2. i am using a child theme so added the code in the child theme’s functions.php file. but i am not seeing any changes.
as you have mentioned in a previous thread, that the schema can be turned off in the customizer, i cannot see any such option in the customizer. i also checked a few links in google structured data tool, but cannot see any changes.
November 18, 2018 at 10:18 am #730384Tom
Lead DeveloperLead DeveloperI’m still seeing 2.1.4 on your website. Are all caching plugins cleared?
November 18, 2018 at 11:44 pm #730646dassana
the new theme is active on the entire site. some pages are cached and some are not. i have purged the cache of a post and you can check on this link – https://www.vegrecipesofindia.com/bhindi-masala
November 19, 2018 at 8:09 am #731132Tom
Lead DeveloperLead DeveloperNow I’m seeing the new version.
Where did you add the function above?
November 19, 2018 at 8:45 am #731159dassana
i have added the code in the child theme’s functions.php file.
November 19, 2018 at 2:09 pm #731395Tom
Lead DeveloperLead DeveloperHave you made sure all caches are clear? Testing on my end and it’s all working as it should with that exact code.
November 19, 2018 at 11:37 pm #731711dassana
yes i did for the link i gave. but i can see the extra schema on the structured data tool. also i cannot see any option in the customizer for disabling the extra schema. i can see the other changes you have included in the customizer option.
i hope i am following the right thing. i do not know how the extra schema can be removed. for now the code is still added in the functions.php child theme.
November 20, 2018 at 8:57 am #732366Tom
Lead DeveloperLead DeveloperThere is no Customizer option to disable the microdata – you need to use the function.
I just gave this to another customer and it worked:
add_filter( 'generate_schema_type', '__return_false' );November 20, 2018 at 10:42 pm #732958Dietmar
Hi there,
I tried both codes mentioned above and I’m still seeing the hatom microformat on both my pages in Googles testing tool.
Basically I only want the Article type schema. Can you help me with that?
Thank you!
November 20, 2018 at 11:22 pm #732977dassana
hi tom
not sure why the extra schema is appearing in the google testing tool. i have added both the codes that you have given at separate times. no change in the schema. it’s the same. intitally i added the first code and then removed it and added the second code. for now the second code is active on the site and you can check this link – https://www.vegrecipesofindia.com/matar-paneer/
first code:
add_filter( ‘generate_schema_type’, function() {
return ”;
} );second code:
add_filter( ‘generate_schema_type’, ‘__return_false’ );November 21, 2018 at 9:18 am #733570Tom
Lead DeveloperLead DeveloperDietmar – the hatom stuff is done using classes within the elements. These classes can’t be removed currently. However, having them in there won’t interfere with your schema microdata at all.
dassana – I’m not seeing the built-in microdata on your site anymore.
November 21, 2018 at 10:54 pm #734072dassana
hi tom
i did not understand what you mean? in the google testing tool i can see the extra schema with no changes.
November 22, 2018 at 5:54 am #734374dassana
you can check this url where the extra schema is appearing – https://search.google.com/structured-data/testing-tool#url=https%3A%2F%2Fwww.vegrecipesofindia.com%2Fmatar-paneer%2F
-
AuthorPosts
- You must be logged in to reply to this topic.