Hide Price

#96760
  • Hi RankMath,

    for my site kapsalonartikelen.nl I have the Addify – Hide Price plug-in active so that people will have to log-in first to show product prices. However, when searching on Google I see product price -> https://images.app.goo.gl/nysNFnUp5DUa5bdr8.

    According to Addify:

    “Hi,

    It seems like your website is using a Schema plugin that adds price in page meta and Google images is displaying price from here,

    We would request you to please disable price schema tags from plugin.”

    It’s because RankMath adds product scheme? Can you inform how me to disable product price for Google search results?

    Thanks in advance.

Viewing 1 replies (of 1 total)
  • Alberto
    Rank Math business

    Hello,

    Thank you for contacting Rank Math today.

    It is possible to remove certain properties from the rich snippet. You can add the following code to your theme’s functions.php file to remove the price:

    /**
     * Filter to Short-circuit Schema if a 3rd party is interested in generating their own data.
     * Replace $schmea_type with schema name like article, review, etc.
     * @param array $entity Snippet Data
     * @return array
     */
    add_filter( "rank_math/snippet/rich_snippet_product_entity", function( $entity ) {
     unset($entity['offers']['price']);
     return $entity;
    });

    Keep in mind that meanwhile it will remove the price, you might have errors in the Google Search Console since Google expects to have a price when using the Product Schema.

    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 1 replies (of 1 total)

The ticket ‘Hide Price’ is closed to new replies.