Archived topic
Schema Showing Multiple Results
7 replies · Started by Mary Pearson on September 21, 2019
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.php
Seemed 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.
Hey Mary,
Is the snippet still added?
What if you do this?:
add_action( 'wp', function() {
add_filter( 'generate_schema_type', '__return_false' );
} );
Hi Tom,
Still seeing two identical entries for Product. Dumped cache, etc.
Any custom page templates or functions on the site? Something is preventing that filter from working.
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.
Hmm, any chance you can send me temporary admin login details?: https://generatepress.com/contact
I sent to Pre-sales questions. Hope that's where you meant.
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!!!