[Resolved] Schema Showing Multiple Results

Home Forums Support Schema Showing Multiple Results

  • This topic has 7 replies, 2 voices, and was last updated 1 year ago by Mary Pearson.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #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.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.

    #1015601
    Tom
    Lead Developer
    Lead Developer

    Hey Mary,

    Is the snippet still added?

    What if you do this?:

    add_action( 'wp', function() {
        add_filter( 'generate_schema_type', '__return_false' );
    } );
    #1015618
    Mary Pearson

    Hi Tom,

    Still seeing two identical entries for Product. Dumped cache, etc.

    #1016015
    Tom
    Lead Developer
    Lead Developer

    Any custom page templates or functions on the site? Something is preventing that filter from working.

    #1016033
    Mary 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.

    #1016244
    Tom
    Lead Developer
    Lead Developer

    Hmm, any chance you can send me temporary admin login details?: https://generatepress.com/contact

    #1016253
    Mary Pearson

    I sent to Pre-sales questions. Hope that’s where you meant.

    #1018169
    Mary 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!!!

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.