Product schema issue

#573186
  • Resolved Anonymous
    Rank Math free

    Hi there,

    I have recently used a product Scheme for one of the sites and when showing in the Google result,s it shows the review star rating with Reviewed by username (WP admin username). I want to remove the username from the SERP and add the votes count. Kindly help to resolve this.

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.

    Please note that the author’s name is only displayed if there is a single review on the page. When you’ll have more than a single review, Google will stop displaying the name and will show the number of reviews available for that product.

    For now, you can change the name and URL of the author by applying and modifying this code:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['review'][0]['author']['name'] = 'My Name';
        $entity['review'][0]['author']['url'] = 'https://google.com';
        return $entity;
    });
    

    Here’s how you can add filter/hook to your WordPress site: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    Hope that helps and please don’t hesitate to let us know if you have any other questions.
     
    Thank you.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

Viewing 1 replies (of 1 total)

The ticket ‘Product schema issue’ is closed to new replies.