Integration with

  • Hello

    I use for collecting and showing reviews on my product pages. This tool also has the ability to create structured data for my products. However, it seems that Rankmath does not add @id to the snippets. Without an @id cannot link the json-ld snippet to the product page snippet.

    I contacted Rankmath on Facebook about this and they proposed to add this to functions.php . than proposed to replace the “ID_here” with “{{json product.url}}”. Unfortunately, this still doesn’t give the results, the markup is not picked up by Google structured data testing tool.

    Can Rankmath please look into this and provide a viable solution?


Viewing 5 replies - 16 through 20 (of 20 total)
  • Hi Gilles,

    Yes, that is the only code you should add.


    Added the code and it is showing the reviews no in the structured data testing tool. See:

    However, “itemreviewed” is still missing. Is it possible to add this too?
    I’m also getting several other warnings in the data testing tool but I do not believe this has anything to do with the reviews but rather Woocommerce and Rankmath?


    The Rank Math plugin reads the value from the reviews and ratings which users give using the comment form on the product pages. If a user has added any reviews then it will show in the Schema Markup.

    I see Google Structured data testing tool is throwing warnings in the isRealated, isSimilar fields in Product schema but it’s a false positive. In isRelatedTo and isSimilar only product name and URL are required. You can check this in the new Google Rich Snippet testing tool:

    If you don’t want to show isRelated & isSimilar fields in the schema then please replace the code we provided you before with the following:

    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    	global $post;
    	$entity['@id'] = get_the_permalink( $post );
    	if ( isset( $entity['isRelatedTo'] ) ) {
    		unset( $entity['isRelatedTo'] );
    	if ( isset( $entity['isSimilarTo'] ) ) {
    		unset( $entity['isSimilarTo'] );
    	return $entity;

    I hope that helps. Thank you.


    Thank you, that worked!

    I also want to add “Brand” to my structured data. What code should I use for this? I only sell my own branded products so this would be my brand name for everything.

    PS: I think it’s amazing I get this level of support for a free product while I got shitty support for a paid SEO plugin in the past. Definitely subscribing to Rankmath Pro when it arrives! 🙂

    Hi Gilles,

    We are so glad to be of help.

    You can use this code for adding a brand name:

    // Add Brand for Products.
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        $entity['brand'] = 'Rank Math';
        return $entity;

    Change “Rank Math” to your own brand name.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.


    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 5 replies - 16 through 20 (of 20 total)

The ticket ‘Integration with’ is closed to new replies.