Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
We are building a B2B website, and our pricing is already hidden throughout our site.
However, it still appears in our search engine listing. Most other recommendations are to disable crawling for the pages with pricing. This is not an acceptable solution.
How can we hide our pricing from our search engine listings, and still allow our pages to be indexed by Google?
Thank you.
Hi,
To achieve this, you'll have to remove all the pricing data form the product schema and for the price within the product page, only show it for logged in users.
The price displayed in search engine listings is set within a script tag found in the product page's code. For example:
<script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "Blue Snowboard",
"url": "https:\/\/martin-dumpstore.myshopify.com\/products\/blue-snowboard",
"image": [
"https:\/\/martin-dumpstore.myshopify.com\/cdn\/shop\/files\/stem.png?v=1721550190\u0026width=1920"
],
"description": "",
"brand": {
"@type": "Brand",
"name": "martin-dumpstore"
},
"offers": [{
"@type" : "Offer","availability" : "http://schema.org/InStock",
"price" : 100.0,
"priceCurrency" : "PHP",
"url" : "https:\/\/martin-dumpstore.myshopify.com\/products\/blue-snowboard?variant=48879522382128"
}
]
}
</script>
This script tag determines what will be displayed in search engine listings. To remove the price, simply delete the "price" from within the script tag.
Thank you. What if it needs to be done for every SKU? Is there a way to do it across the entire store?
Yes, the JSON scheme is most likely being generated using a template. You'll need to update that template and it'll apply for all the products given that it's the default template for the products.
Thank you! Where do we locate the JSON scheme to edit it?
Would this be within product.json? Can I utilize
{% comment %} {% endcomment %} to comment out any references to price, or do they need to be deleted?
It could be within a section of the product page. If your product page template is a JSON template then you won't be find it there as it's simply a template specifying the sections that make up your product page. I'd recommend you seek professional help if you're familiar with aforementioned processes.
By investing 30 minutes of your time, you can unlock the potential for increased sales,...
By Jacqui Sep 11, 2024We appreciate the diverse ways you participate in and engage with the Shopify Communi...
By JasonH Sep 9, 2024Thanks to everyone who participated in our AMA with 2H Media: Marketing Your Shopify St...
By Jacqui Sep 6, 2024