• Resolved tatts

    (@tatts)


    This is the code for WooCommerce,
    What should I change for my site?

    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;
    }

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @tatts ,

    The example snippet you’ve shared can be used to disable the schema markup generated by All in One SEO on all the products of your site.

    If you want to disable the schema markup on all the posts, you can use this code snippet-

    add_filter( 'aioseo_schema_disable', 'aioseo_disable_schema_posts' );
    function aioseo_disable_schema_posts( $disabled ) {
    ???if ( is_singular( 'post' )) {
    ??????return true;
    ???}
    ???return $disabled;
    }

    Let me know if you’d like to disable the schema markup elsewhere.

    Thread Starter tatts

    (@tatts)

    Hi shivamtyagi

    thank you for your reply.
    I have added to this code snippet- in functions.php.
    However, the schema markup still does not disappear.

    What should I do now?

    • This reply was modified 1 year, 7 months ago by tatts.
    • This reply was modified 1 year, 7 months ago by tatts.
    Plugin Support Shivam Tyagi

    (@shivamtyagi)

    Hi @tatts,

    I checked the source code of posts on your site and I can confirm that our schema markup is no more present.

    Could you please share the URL of the page where you’re still seeing our schema markup?

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘aioseo_schema_disable’ is closed to new replies.