-
Hi,
I had the worning for Either “offers”, “review”, or “aggregateRating” should be specified in Google Search Console and followed a previous ticket thread on the forum (which was very useful) but when I followed the advice to mannually ad the code for brand (which is below) it completely broke my site. There was a critical error and I was only able to get into my site via FTP. I removed the code from the theme funcions.php file and everything went back to normal.
// Add Brand for Products.
add_filter( ‘rank_math/snippet/rich_snippet_product_entity’, function( $entity ) {
$entity[‘brand’] = ‘Rank Math’;
return $entity;
});Does anyone know what could have gone wrong? I really want to add the brand.
The only thing that I come up with is that when I replaced $entity[‘brand’] = ‘Rank Math‘; with my brand name it was quite long – 3 words and in Cyrillic. Maybe I should only put the name of the brand and in Latin letters?Any advice is highly appreciated!
Cheers,
Megan
The ticket ‘GSC Errors “offers”, “review”, or “aggregateRating” – code breaks site’ is closed to new replies.