Remove or change author from Product rich snippet.

#586117
  • Resolved Anonymous
    Rank Math free

    Hello,

    I’m using product rich snippet and I configure the review option with a maximum and minimum rate, but on the rich snippet appears the author as me:

    "review": {
    "@type": "Review",
    "datePublished": "2023-02-18T13:37:30+01:00",
    "dateModified": "2023-04-27T16:42:20+01:00",
    "author": {
    "@type": "Person",
    "name": "José Sabater"
    },

    ¿There is a way to remove the “author” part?

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for any inconvenience this issue may have caused you.

    Please note that the author property is a required one for the Review Schema as is stated in the Google guidelines so you can’t remove that if you want to have a compliant Schema:
    https://developers.google.com/search/docs/advanced/structured-data/review-snippet

    However, you can change the name and URL of the author by applying and modifying this code if you are using the Product Schema to add the review:

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

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

    Hope that helps.

    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 ‘Remove or change author from Product rich snippet.’ is closed to new replies.