• Resolved ssiinnaa

    (@ssiinnaa)


    hi there. we have a local price that our users feel more comfortable with, but its not iso; i am willing to change the store price to local and edit schema to show iso currency to google.
    i’ve tried this snippet but nothing change either in fucntions.php or rank-math.php file.

    //add rial currency to rankmath product schema
    add_filter( 'rank_math/snippet/rich_snippet_product_entity', function( $entity ) {
    	$entity['offers']['priceCurrency'] = "IRR";
    	return $entity;
    } );

    please help me with this situation

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

    (@rankmathteam)

    Hello @ssiinnaa,

    Thank you for contacting Rank Math support today and bringing your concern to our attention.

    We tried applying the filter code on our setup, and it seems to be working just fine.

    Can you please clear your website cache and check again from your end?

    If the issue persists, please share one example URL here so we can check the schema structure.

    Looking forward to helping you with this one.

    Hello there , thank you for this code , this code helped me and fixed my issue ,

    after i installed rankmath seo i have this issue : “Missing field “price” (in “offers”)”

    before that i was using yoast ,and it was fine !

    this issue is for those products that have no prices ! (out of stock)

    like these two urls :

    https://kafsh.org/?p=147769

    https://kafsh.org/?p=67893

    • This reply was modified 1 year, 9 months ago by alikratos29.
    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @alikratos29,

    Since the price is not present on the product we are also not able to parse it into the Schema markup.

    The best way to handle out-of-stock products is to remove them from the catalog, so they don’t waste an unnecessary crawl budget on your website.

    Essentially, you can either set the product to a 404 page, redirect it to another relevant page or set the availability of the product in the Schema to be out of stock.

    Don’t hesitate to get in touch if you have any other questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘add custom price currency’ is closed to new replies.