- This topic has 7 replies, 2 voices, and was last updated 3 years, 4 months ago by
Mary Pearson.
-
AuthorPosts
-
September 21, 2019 at 3:02 pm #1015527
Mary Pearson
I have installed Schema Pro and got three results in Google Structured Data Testing Tool for all my Products. Their tech support told me that one result was from WooCommerce and they gave me code to disable it.
By switching themes the issue was fixed, so we assume the extra one is coming from my child theme. From previous forum posts I saw that the solution is to add
add_filter( 'generate_schema_type', '__return_false' );
to my functions.phpSeemed simple and I was elated, except that it doesn’t work. I’ve tried adding it to my functions.php, and when that didn’t work I tried adding it as a snippet in Woody Ad Snippets. No change. I am still showing two results for all the Products in my store.
I’ve deactivated my caching plugin, dumped my history and tried it in different browsers. The issue remains.
What am I missing? Thank you.
September 21, 2019 at 6:30 pm #1015601Tom
Lead DeveloperLead DeveloperHey Mary,
Is the snippet still added?
What if you do this?:
add_action( 'wp', function() { add_filter( 'generate_schema_type', '__return_false' ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 21, 2019 at 7:43 pm #1015618Mary Pearson
Hi Tom,
Still seeing two identical entries for Product. Dumped cache, etc.
September 22, 2019 at 10:22 am #1016015Tom
Lead DeveloperLead DeveloperAny custom page templates or functions on the site? Something is preventing that filter from working.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 22, 2019 at 10:35 am #1016033Mary Pearson
I have a whole whack of stuff going on. It’s a multisite with 7 sub-domains so lots of plugins and custom coding.
functions.php was a great starting point (thank you) so I deleted all other code except yours, but I am still getting two results.
September 22, 2019 at 7:40 pm #1016244Tom
Lead DeveloperLead DeveloperHmm, any chance you can send me temporary admin login details?: https://generatepress.com/contact
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentSeptember 22, 2019 at 8:16 pm #1016253Mary Pearson
I sent to Pre-sales questions. Hope that’s where you meant.
September 24, 2019 at 4:57 pm #1018169Mary Pearson
Many thanks for all the time you spent on this when I know now, from testing another site, that it is not the fault of the child theme.
Closing the ticket and will continue to keep searching but don’t want to take up any more of your time when it isn’t your problem.
Thanks again!!!
-
AuthorPosts
- You must be logged in to reply to this topic.