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
-
Structured data / Rich snippets
I have made FAQ to my website Lån utan UC. I have double checked several time and the code is correct. THe problem is that the FAQ it does not show up i Google search. I have put the code at several subpages, like for example: Mikrolån and at all other sites it shows in SERP but not for the first mentioned site above. That site is the startpage/homepage is that relevant to the issue? Please help and I would be really happy. I have tried to fix this in months...
Technical SEO | | LanutanUC0 -
Schema Markup Errors - Priority or Not?
Greetings All... I've been digging through the search console on a few of my sites and I've been noticing quite a few structured data errors. Most of the errors are related to: hcard, hentry and hatom. Most of them are missing author & entry-title, while the other one is missing: fn. I recently saw an article on SEL about Google's focus on spammy mark-up. The sites I use are built and managed by vendors, so I would have to impress upon them the impact of these errors and have them prioritize, then fix them. My question is whether or not this should be prioritized? Should I have them correct these errors sooner than later or can I take a phased approach? I haven't noticed any loss in traffic or anything like that, I'm more focused on what negative impact a "phased approach" could have. Any thoughts?
Technical SEO | | AfroSEO0 -
Google’s Latest Manual Action Penalty: Spammy Structured Markup
Anyone out there begin receiving this and or know when it started? Google has recently began sending a new manual action spam notification to webmasters for “spammy structured markup” also known as rich snippet spam. Your pal, Chenzo
Technical SEO | | Chenzo0 -
Which rich snippets wordpress pluggin would you advice
Ello friends which rich snippets wordpress pluggin would you advice for my site
Technical SEO | | maestrosonrisas0 -
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 -
Schema Markup and Google's Rich Snippet Tool
Has anyone ever used the snippet tool and gotten the following error "could not fetch website"? When using the tool and placing an url that does not have markup present it will show that as the error. Or if part of markup is wrong, it will diagnose it accordingly. Did a search online and found limited info...one of which someone had this error but when other users tested it, they were not getting the same error.
Technical SEO | | andrewv0 -
Markup reference data using Scheme.org
Can anyone point me to a page showing how to mark up reference data according to schema.org ? Ie glossary or dictionary page.
Technical SEO | | sprynewmedia0 -
Is Adobe Acrobat the best for making PDF documents in terms of seo and price?
As we add PDF documents to our website, I want to take it up a notch. In terms of seo and software price, is Adobe Acrobat the only choice? Thanks! No Mac here. I should clarify that I can convert files to PDFs with Microsoft Word and add some basic info for the search engines such as title, keywords, author, and links. This article inspired me: www.seomoz.org/ugc/how-to-optimize-pdf-documents-for-search I can add links back to the page when I create the PDF, but we also have specific product PDFs that suppliers let us copy and serve from our server--why use their bandwidth. Much as you would stamp your name on a hard copy brochure the vendor supplies, I want to add a link to our page from those PDFs. That makes me think I should ask our supplier to give me a version with a link to our page. Then there is the question: is that ok to do? In the meantime, I will check TriviaChicken's suggestions and dream about a Mac, Allan. Thanks
Technical SEO | | zharriet0