• Resolved Billy

    (@will-woolley)


    Hi there,

    I have searched the forum and can’;’t find the answer to this. I am trying to add product ID and product Price to the microdata / Schema for products with options such as this.

    Here is a screenshot of the error notification. How do I add Product ID and Price to the Schema markup?

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @will-woolley,

    Thank you for reaching out to us.

    Can you please try adding the filter below to your theme’s functions.php?

    add_action( 'rank_math/head', function() { if ( ! is_product() ) { return; } global $product; echo '<meta property="product:price:amount" content="'.wc_get_price_including_tax( $product ).'" />'; echo '<meta property="product:retailer_item_id" content="'. $product->get_id() .'" />'; }, 99 );

    You may refer to this guide on how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/

    After that, please try clearing your website cache and check again.

Viewing 1 replies (of 1 total)
  • The topic ‘Products without “id” information can’t be uploaded’ is closed to new replies.