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
-
Social Profile & Logo Markup: Where to add it?
We're looking to implement structured data for our social profiles and logo, as referenced here: https://developers.google.com/search/docs/data-types/social-profile https://developers.google.com/search/docs/data-types/logo Should we add the markup for these structured data types to multiple pages, the homepage only, or all indexable pages? TIA
Technical SEO | | Allie_Williams0 -
Breadcrumb Trail Markup
I've implemented breadcrumb trail markup on my site and I wanted to check that it's implemented correctly. Is it true that the breadcrumb does not link to the current page as this would be redundant, so it only links to 'ancestor' pages? (You can see for example on this page that the breadcrumb links to two levels below the home page): http://www.cobaltrecruitment.com/sectors/construction-property-engineering/real-estate-general-practice So basically breadcrumb trail should have a simple link for each level (except for the current page). Thanks,
Technical SEO | | the-gate-films0 -
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 -
Home Page Blog Snippets - Duplicate Content Help?
Afternoon Folks- I have been asked to contribute to a new site that has a blogfeed prominently displayed on the home page. It's laid out like this: Logo | Menu HOME PAGE SLIDER Blog 1 Title about 100 words of blog 1 Text Blog 2 Title about 100 words of blog 2 Text Blog 3 Title about 100 words of blog 3 Text Footer: -- This seems like an obvious duplicate content situation but also a way I have seen a lot of blogs laid out. (I.E. With blog content snippets being a significant portion of the home page content) I want the blogs to rank and I want the home page to rank, so I don't feel like a rel canonical on the blog post's is the correct option unless I have misunderstood their purpose. Anyone have any ideas or know how this is usually handled?
Technical SEO | | CRO_first0 -
Open Graphs and Schema Markups
Hi Moz, Do I need to duplicate a schema tag if I already have an open graphs tag pertaining to that particular property? Ex. Title of a product. Thanks,
Technical SEO | | Mike.NW0 -
Rich Snippet Date Removal
Hey Mozzers, I'm having a real problem getting some rich snippet data to go away! Normally i'm all for it, but in this case it's giving our department page a video rich snippet and also a really super old date (i'm not sure if this is connected with the video rich snippet, but it showed up at the same time). The SERP is here: https://www.google.co.uk/search?q=pool+table&pws=0&hl=en&num=10 We are 3rd for our page http://www.libertygames.co.uk/store/pool_tables/ I can't find the date Google is using anywhere on the page, in the headers or file dates or anything. I've even removed the video markup and removed the page from the video sitemap, the rich snippet testing tool confirms this : http://www.google.com/webmasters/tools/richsnippets?q=http%3A%2F%2Fwww.libertygames.co.uk%2Fstore%2Fpool_tables%2F Does anyone have any ideas why this might be showing up or if there is a way to speed up getting it off there and our old meta description back? I'm pretty sure it's killing our click-throughs. Thanks in advance, Stuart
Technical SEO | | stukerr0 -
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