Found this code but it doesn’t work. After inserting it, nothing changes.
add_filter( 'aioseo_schema_output', 'aioseo_filter_schema_output' );
function aioseo_filter_schema_output( $graphs ) {
foreach ( $graphs as $index => $graph ) {
if ( 'BreadcrumbList' === $graph['@type'] ) {
unset( $graphs[ $index ] );
}
foreach ( $graph as $key => $value ) {
if ( 'breadcrumb' === $key ) {
unset( $graphs[ $index ][ $key ] );
}
}
}
return $graphs;
}
@ikiterder that code snippet should work. Where did you add it? Your child theme’s functions.php file would be ideal.
arnaudbroes
Updated from version 4.1.2.2 to version 4.1.3.1 and code worked O_o
@ikiterder makes sense since we added that filter in the latest version. 😉
Hello. @arnaudbroes The same problem with disable breadcrumbs schema.
Version is 4.1.6.2
1. function.php consists:
//disable breadcrumbs schema
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;
}
2. Plugin settings:
https://prnt.sc/26ngnef
Results:
html cource consist breadcrumbs schema code
https://prnt.sc/26ngojv