Remove BreadcrumbList Schema

add_filter(‘aioseo_schema_output’, ‘aioseo_schema_remove_breadcrumblist_schema’); function aioseo_schema_remove_breadcrumblist_schema($graphs) { foreach ($graphs as $index => $value) { if (isset($value[‘@type’]) && $value[‘@type’] === ‘BreadcrumbList’) { unset($graphs[$index]); } } return $graphs; }Continue reading

Add deliveryTime schema to shippingDetails schema

add_filter( ‘aioseo_schema_output’, function ( $schema ) { foreach ( $schema as &$schemaItem ) { if ( isset( $schemaItem[‘@type’] ) && ‘Product’ === $schemaItem[‘@type’] ) { if(!empty($schemaItem[“offers”][“shippingDetails”])){ // Loop inside the Offers > shippingDetails schema foreach( $schemaItem[“offers”][“shippingDetails”] as &$schemaItemChild ){ //…Continue reading

Increase SEO Analyzer TimeOut

add_filter( ‘http_request_args’, ‘aioseo_filter_analyzer_timeout’, 1, 2 ); function aioseo_filter_analyzer_timeout( $args, $url ) { if ( ‘https://analyze.aioseo.com/v1/analyze/’ === $url ) { $args[‘timeout’] = 120; } return $args; – }Continue reading

Remove Author Schema entirely from the website

add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘author’]) ) { unset($schemaItem[‘author’]); } } return $schema; }Continue reading

Add missing mainEntity to ProfilePage Schema

add_filter( ‘aioseo_schema_output’, function ( $schema ) { foreach ( $schema as &$schemaItem ) { if ( empty( $schemaItem[‘mainEntity’] ) && isset( $schemaItem[‘@type’] ) && ‘ProfilePage’ === $schemaItem[‘@type’] ) { global $wp; $current_url = untrailingslashit( home_url( $wp->request ) ); $schemaItem[‘mainEntity’] =…Continue reading

Add the type property to that Image property in the Organization schema

add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘@type’]) && ‘Organization’ === $schemaItem[‘@type’] ) { if(!isset($schemaItem[‘image’][‘@type’])){ $schemaItem[‘image’][‘@type’] = ‘ImageObject’; } } } return $schema; }Continue reading

Set max-video-preview to 0

add_filter( ‘aioseo_robots_meta’, ‘aioseo_filter_robots_meta’ ); function aioseo_filter_robots_meta( $attributes ) { $attributes[‘max-video-preview’] = ‘max-video-preview: 0’; return $attributes; }Continue reading

Add author name to article schema if its missing

add_filter( ‘aioseo_schema_output’, ‘add_author_name_when_missing’ ); function add_author_name_when_missing( $schema ) { if ( is_single() && ‘post’ == get_post_type() ) { global $post; $author_id = $post->post_author; $author_name = get_the_author_meta( ‘display_name’, $author_id ); foreach ( $schema as &$schemaItem ) { if ( isset($schemaItem[‘@type’]) &&…Continue reading