How to add image metadata schema

#659448
  • Resolved Anonymous
    Rank Math free

    Hey there, we would like to add the image meta on a client’s site product pages, here’s an example:https://avistamembranesolutions.com/products/avistaclean-p0327/ – we cant add product schema because the client doesn’t want reviews on his web pages and don’t have GTINs. I was following a guide on your knowledge center, but it was for pages using the article template and our product pages use the company info template. Wondering how we can go about add the image metadata for our product pages.

    Please advise.

    Thanks!

Viewing 1 replies (of 1 total)
  • Hello,

    Thank you for contacting us and bringing your concern to our attention.

    As you’re not using the Rank Math WooCommerce product schema, if you want to add/modify the schema in Rank Math, you may need to use and customize this filter on your site:
    https://rankmath.com/kb/filters-hooks-api-developer/#extend-json-ld-data

    However, even if you use the product schema on your site, you can use the follow filter on your website to remove the reviews:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    	if($entity['aggregateRating']) {
    		unset($entity['aggregateRating']);
    		unset($entity['review']);
    	}
    	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 ‘How to add image metadata schema’ is closed to new replies.