-
Hello,
Before submit post here, I already read these two post, but still I can not fix the issue:
https://rankmath.com/kb/woocommerce-custom-brand-schema/
https://rankmath.com/kb/either-offers-review-or-aggregaterating-should-be-specified/I am using this short code by Rankmath support to enable map attributes:
add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
global $product;
if ( ! is_a( $product, ‘WC_Product’ ) ) {
return $entity;
}
{
$entity[‘offers’][ ‘priceValidUntil’ ] = date( ‘Y-12-31’ );
}
$entity[‘mpn’] = “{$product->get_sku()}”;
return $entity;
} );/**
* Filter to add Brand Name for Products.
*
* @param array $entity Snippet Data
* @return array
*/
add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
$entity[‘brand’] = ‘Lovcour’;
return $entity;
});When testing on Google structured data test tool, it show warnings, and please check the screenshots:
https://prnt.sc/1ya0br7After click the “product”, it will show as this screenshot:
https://prnt.sc/1ya0cubBut there is “brand”:”Lovcour” in html codes.
Would you please let me know how to remove the warning?
Also, you might like check test this product page.
Thanks and have a nice day.
Alex
The ticket ‘Warning with Brand on Google Rich Results Test’ is closed to new replies.