Product Structured data mixed up with related products

#21318
  • Resolved anandf
    Rank Math free

    When I did the Google Structured Data (https://search.google.com/structured-data/testing-tool/) test on one of my product pages, it shows 1 product with multiple names, brands, and other product-related data. I found out that it also adds the product metadata from the “Related Products” section that comes on the product page under the product. This doesn’t happen in other SEO plugins that I’ve used in the past. Also, it doesn’t fetch the Brand.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hello,

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

    The Brand value is visible on the schema data of the product that you shared on the sensitive data section:
    Screen grab

    You can also remove the isRelatedTo entity from the schema by using the following code on your theme’s functions.php file:

    /**
     * Filter to modify schema daata.
     *
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
        if(isset($entity['isRelatedTo'])){
           unset($entity['isRelatedTo']);
           return $entity;
        }
       
        return $entity;
    });

    Looking forward to helping you. Thank you.

    ​​​​​​​

    anandf
    Rank Math free

    That got solved. But now the “Availability” and “Item Condition” show wrong values.

    It should be

    Availability : InStock
    ItemCondition: NewCondition

    But it shows

    Availability : http://schema.org/InStock
    ItemCondition: http://schema.org/NewCondition

    Screenshot: https://d.pr/free/i/3J6xh8

    Hello,

    Thank you for contacting Rank Math and sorry for the delayed response.

    Your last response was unfortunately stuck on our moderation queue and this is reason behind the late follow up.

    Back to the issue, I have tested the product link and it looks like you have been able to address the problem. There is only a warning for a missing GTIN and priceValidUntil. The former can be fixed by installing this plugin to help in entering this value: https://wordpress.org/plugins/product-gtin-ean-upc-isbn-for-woocommerce/ The latter can be fixed by entering a product sale price date.

    Looking forward to helping you. 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 3 replies - 1 through 3 (of 3 total)

The ticket ‘Product Structured data mixed up with related products’ is closed to new replies.