Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter ikiterder

    (@ikiterder)

    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;
    }
    Plugin Author arnaudbroes

    (@arnaudbroes)

    @ikiterder that code snippet should work. Where did you add it? Your child theme’s functions.php file would be ideal.

    Thread Starter ikiterder

    (@ikiterder)

    arnaudbroes
    Updated from version 4.1.2.2 to version 4.1.3.1 and code worked O_o

    Plugin Author arnaudbroes

    (@arnaudbroes)

    @ikiterder makes sense since we added that filter in the latest version. ??

    OK

    (@angelok1979)

    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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘How to disable Breadcrumbs in aioseo-schema’ is closed to new replies.