Exclude price in rich snippet markup
-
Our site has their prices hidden for non logged in users.
Its a woocommerce built site and the rich snippet markups are added by woocommerce.
I would like to remove the markup for the price becouse : 1, we would like our customers to register for prices. 2 i dont want to get penalties for not showing the same thing to visitors as to "google" ..
Any help or thoughts on this one?
Thanks
/ Jonas
-
That lead me to the right direction!
Got it all working with price excluded in the rich snippet, still validating as a product with reviews, sku and description.
My solution..
Create following directories:
wp-content/themes/[your_theme]/woocommerce
wp-content/themes/[your_theme]/woocommerce/single-product
Create price.php and ad it to /single-product
Ad this code to the custom price.php
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
}global $product;
?>
get_price_html(); ?>
// Jonas
-
I don't know what kind of Woo + WordPress + theme you use. But you can download everything into separate folder and use tool to find text in all files. You just need to look who is responsible for "schema.org/Offer" adding into HTML.
Here is shoot in the dark:
https://webdesires.co.uk/blog/add-schema-to-woocommerce-products/
you just need to reverse this change.As i said - it's just guessing. Can be also in plugin somewhere.
-
Hi Peter and thanks for your respons!
Any tips on how to do this patch in an easy way?
-
Here is example of Rich Snippet w/o offer (with price):
ACME
Executive Anvil
Sleeker than ACME's Classic Anvil, the
Executive Anvil is perfect for the business traveler
looking for something to drop from a height.Product #: 925872
4.4 stars, based on 89 reviewsAs you can see this code can be validated and works OK. Now you need to go back in Woo and make "patch" to remove http://schema.org/Offer where is price located. OR temporary disable them.
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
Problem with Markup (Price, MaxPrice, MinPrice)
Hi Hi, I've inserted some Markup on my homepage for a vacation flat. It's looking like thies: As there is not just one price for the whole season, I used minPrice and maxPrice to define it. Unfortunatelly the Google Testing Tool (https://developers.google.com/webmasters/structured-data/testing-tool/) sais, that the value "price" has to be also in the code, but I have no clue what value I should give it? Has someone an advice? Thank you very much! Best regards André
Technical SEO | | Andre-S0 -
With rich snippets is it bad to add a city to the company name?
I have a client that is a franchise. Each franchise location has a different office address. Is it bad for me to do the following? COMPANY NAME of CITY ... .... There are about 10 franchisees. Should I use just the company name? Is the city in there going to be a negative?
Technical SEO | | thomas.wittine0 -
How to properly do reviews with Rich Text Snippets
I am trying to find out the best way to do this. Do you use hreview? Thanks,
Technical SEO | | netviper0 -
Can you help me understand leveraging semantic markup
Hi, i am trying to understand about leveraging semantic markup but even though i have read the page on the link, i am still not sure of what it means and how i can use it in my site www.in2town.co.uk which has been built using joomla If anyone can help me understand then that would be amazing and help me understand how it would benefit my site.
Technical SEO | | ClaireH-1848860 -
Using rich snippets with a CMS?
My site uses the webEdition CMS that is split between templates and documents (pages). A template responsible for a number of documents. If I wish to use rich snippets, how and where can I add the microdata as I can't do it on a page per page basis? My CMS documentation and its developer forum doesn't give any information on this but I'm hoping its a common problem for open source CMS's and there is an easy fix. I live in hope! Iain
Technical SEO | | iain0 -
How do you get a Google+ pic in your SERP snippet
Hi from from 20 degrees C 83% humidity wetherby UK 🙂 A few weeks back i decided i needed to get my pretty face appearing in my serps for www.davidclick.com But after having set up a Gppgle+ account and linking my site to the Google+ account i think I may have done something wrong 😞 I linked to the Google+ page via a footer link in www.davidclick.com but alas I'm not able to get my face in my SERP which this website has: http://i216.photobucket.com/albums/cc53/zymurgy_bucket/google-plus-picJPGcopy.jpg So my question is please - "How do you get your Google+ account image to appear in the SERPS. Ta muchly,
Technical SEO | | Nightwing
David0 -
New to rich snippets, help needed
Hi, I have an online store selling mens business attire in Australia. I have had my developers add the required code to allow rich snippets. You can see the result here http://www.google.com/webmasters/tools/richsnippets?url=http%3A%2F%2Fjsshirts.com.au%2Fmens-business-shirts%2Fclassic-fit%2Fsky-blue-poplin-classic-fit-shirt.html&view=cse I have few questions 1.How can I change the product description? Is it possible to use the product Meta Tag as the description? 2.Under the stars and the review count is this text. The excerpt from the page will show up here. The reason we can't show text from your webpage is because the text depends on the query the user types. Should whateever product description I have used show up here? 3.Is there anything else I need to do to get SERP's to show the snippet? Many thanks for any answers, Jason
Technical SEO | | mullsey0 -
We have a decent keyword rich URL domain that's not being used - what to do with it?
We're an ecommerce site and we have a second, older domain with a better keyword match URL than our main domain (I know, you may be wondering why we didn't use it, but that's beside the point now). It currently ranks fairly poorly as there's very few links pointing to it. However, the exact match URL means it has some value, if we were to build a few links to it. What would you do with it: 301 product/category pages to current site's equivalent page Link product/category pages to current site's equivalent page Not bother using it at all Something else
Technical SEO | | seanmccauley0