• Resolved deeveearr

    (@deeveearr)


    Hi guys,

    I’m looking at coming back to AIOSEO after a near 10-year hiatus, and I notice that you now use schema in the plugin.

    I’m using Schema Pro.

    To prevent duplicate schemas, is there a way to turn it off in AIOSEO, or at least a code snippet to remove it?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support J Burns

    (@subiewrx)

    Hi @deeveearr,

    You can disable schema completely by adding this code snippet to your child theme’s functions.php file –

    add_filter( 'aioseo_schema_disable', 'aioseo_disable_schema' );
    
    function aioseo_disable_schema( $disabled ) {
       return true;
    }
    

    or here’s example to disable the product schema output –

    add_filter( 'aioseo_schema_disable', 'aioseo_disable_schema_products' );
    
    function aioseo_disable_schema_products( $disabled ) {
       if ( is_singular( 'product' ) && aioseo()->helpers->isWooCommerceActive() ) {
          return true;
       }
       return $disabled;
    }

    Please let me know if you have any other questions.

    Thanks!

    Thread Starter deeveearr

    (@deeveearr)

    Hi @subiewrx

    Thanks, I just added the above in Code Snippets.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove Schema?’ is closed to new replies.