- This topic has 8 replies, 3 voices, and was last updated 7 years, 2 months ago by
Tom.
-
AuthorPosts
-
October 21, 2015 at 12:15 am #146168
2fer
Hi Tom,
Is there a simple way to disable or remove the micro-data schema markup? I don’t use it so it throws errors. For some sites, it may be useful, but this site is informational and fairly static, the WP part of this site is only about 10 pages (some legacy pages no-indexed) and the major part of the site is not WP. I may be asking in the wrong place, but I don’t see it in my non-GP WP sites, so I thought I’d ask here first.
Thank you!
2ferOctober 21, 2015 at 12:29 am #146171Tom
Lead DeveloperLead DeveloperHi there,
It shouldn’t throw any errors – there’s not really anything to “use”, it just sits there in the background.
It won’t hurt anything keeping it in there, that’s for sure.
There’s a couple functions to remove some of the main parts, but some other parts are baked into the core theme and not really removable.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 21, 2015 at 12:45 am #1461762fer
Hi Tom,
Thanks for the quick response. Your support is great! The microdata/schema is lacking information. It wants the “Author” and “Date”, I have not set it up to use this information (and won’t). I can’t see what it does add so I would prefer to remove or disable it if possible. I very much enjoy using the Generate Press theme, but schema should be an individual decision. BTW – the only “Errors” reported are in the GSC (WMT).
Thanks!
2ferOctober 21, 2015 at 12:59 am #146178Tom
Lead DeveloperLead DeveloperI’ll look into this and get back to you π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 21, 2015 at 4:25 pm #146361Tom
Lead DeveloperLead DeveloperAdding the below functions will remove the microdata from the body and article elements: https://gist.github.com/generatepress/539cad38b6bfdc5f9bda
Adding PHP: https://generatepress.com/knowledgebase/adding-php-functions/
In the next version of GP, you’ll be able to completely remove the author and date using a simple filter as well π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentOctober 21, 2015 at 7:33 pm #1463742fer
Hi Tom,
Thank you so much for this solution! I’ll keep a backup copy of functions.php before editing and just upload the edited file. I’m more comfortable editing the php than using another plugin for this. I certainly appreciate the quick answer and think you’re doing a super job!
Thanks again!
2ferOctober 21, 2015 at 11:47 pm #146415Tom
Lead DeveloperLead DeveloperIt’s definitely best just to use a child theme functions.php file – then you can just add the PHP to that file and forget about it π
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJanuary 4, 2016 at 4:41 am #163237Marko
Hello Tom. Happy new Year! You wrote in the past that the microdata could be removed with a simple filter. Is it be possible with the current Theme version 1.3.23? I use the child theme 0.1
thank you
MarkoJanuary 4, 2016 at 10:38 am #163306Tom
Lead DeveloperLead DeveloperHi Marko,
You can do so with the code I posted above: https://generatepress.com/forums/topic/remove-microdata-markup/#post-146361
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-development -
AuthorPosts
- You must be logged in to reply to this topic.