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 markup for wordpress
Hello, I am having problems with marking up my WP posts. I used the All-in-One which seems to be the most user-friendly, except when I denote the aspects of the "article" and update, the markup shows up as a box at the bottom of the post (even though the info is in the text). How do I mark these up for Google without having the unseemly box at the bottom? Thanks so much in advance for any help! Btw, I am not altogether comfortable just yet on manual schematic markup (if you have a really basic manual markup that will let me do so across various platforms, I would also appreciate the recommendation). Thanks!
Technical SEO | | lfrazer1 -
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 -
Exclude status codes in Screaming Frog
I have a very large ecommerce site I'm trying to spider using screaming frog. Problem is I keep hanging even though I have turned off the high memory safeguard under configuration. The site has approximately 190,000 pages according to the results of a Google site: command. The site architecture is almost completely flat. Limiting the search by depth is a possiblity, but it will take quite a bit of manual labor as there are literally hundreds of directories one level below the root. There are many, many duplicate pages. I've been able to exclude some of them from being crawled using the exclude configuration parameters. There are thousands of redirects. I haven't been able to exclude those from the spider b/c they don't have a distinguishing character string in their URLs. Does anyone know how to exclude files using status codes? I know that would help. If it helps, the site is kodylighting.com. Thanks in advance for any guidance you can provide.
Technical SEO | | DonnaDuncan0 -
Can You Use More Then One Google Local Rich Snippet on a single site/ on a single page.
I am currently working on a website for a business that has multiple office locations. As I am trying to target all four locations I was wondering if it is okay to have more then one Local Rich Snippet on a single page. (For example they list all four locations and addresses within their footer and I was wondering if I could make these local rich snippets). What about having more then one on a single website. For example if a company has multiple offices located in several different cities and have set up individual contact pages for these cities, can each page have it's own Local Rich Snippet? Will Google look at these multiple "local rich snippets" as spaming or will they recognize the multiple locations and count it towards their local seo?
Technical SEO | | webdesignbarrie1 -
Meta Description VS Rich Snippets
Hello everyone, I have one question: there is a way to tell Google to take the meta description for the search results instead of the rich snippets? I already read some posts here in moz, but no answer was found. In the post was said that if you have keywords in the meta google may take this information instead, but it's not like this as i have keywords in the meta tags. The fact is that, in this way, the descriptions are not compelling at all, as they were intended to be. If it's not worth for ranking, so why google does not allow at least to have it's own website descriptions in their search results? I undestand that spam issues may be an answer, but in this way it penalizes also not spammy websites that may convert more if with a much more compelling description than the snippets. What do you think? and there is any way to fix this problem? Thanks!
Technical SEO | | socialengaged
Eugenio0 -
Rich snippets advice for review products and services
hi, i am trying to get my head around the rich snippets for review products and services. I already use it for articles but it seems you have to do it different when it comes to review products. i have been reading this page https://support.google.com/webmasters/answer/146645 but i cannot understand it. i am trying to use the following page from my site as a test but i am totally confused http://www.in2town.co.uk/benidorm-hotel-reviews/presidente-hotel-review-in-benidorm if anyone has used this or knows how to do it then i would really appreciate some advice
Technical SEO | | ClaireH-1848860 -
Exclude Child URLs from XML Sitemap Generator (Wordpress)
Hi all, I was recommended the XML Sitemap Generator for Wordpress by the very helpful Keith Bloemendaal and John Pring - however I can't seem to exclude child URLs. There is a section Exclude items and a subsection Exclude posts. I have tried inputting the URLs for the pages I don't want in the sitemap, however that didn't work. So I read that you have to include a list of "IDs" - not sure where on earth to find that info, tried the page name and the post= number from the URL, however neither worked. I hope somebody can point me in the right direction - and apologies, I am a Wordpress novice, and I got no answers from the Wordpress forums so turned right back to SEOmoz! Cheers.
Technical SEO | | markadoi840 -
Keyword rich domains
Hi, Our site is beingthere.com.au We are in the business of video conferencing in Australia. I was wondering if there would be any benefit of purchasing keyword rich domains such as www.videoconferencing.net.au www.video streaming.net.au What would be the benefit(s)? And How would I go about using these domains to maximise SEO benefit? Thanks Dan
Technical SEO | | dantmurphy0