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
-
Product schema with no offer as owner wants to give price per customer
Hi, Trying to markup products for a site that does not show prices. Is there any way to markup a product price when the business model is: 1. customer calls or contacts shop. 2. shop gives a price quote based on level of detail and finish on the product 3. there is no base or top price. Thanks in advance!
Technical SEO | | plahpoy0 -
Snippet not work for my article in google
i add script for star snippet in my website but not work in my posts you can see it in this URL https://dlandroid.com/lucky-patcher/ when I searched in google my custom keyword "Lucky patcher apk" my competitor show with star snippet in SERP but my site doesn't show snippet stars.
Technical SEO | | hongloanj1 -
Is Schema markup inappropriate for ?
Is Schema(.org) markup meant specifically to be used on text? Or can you use it in a similar way that you can use Open Graph Protocol? For example, for awhile I've been using something like this on my site: Because it's in the head section, it appears on every page. In review, this seems to be an incorrect use? Should I only be using Schema to mark specific text? If not, what are the consequences of using Schema like this?
Technical SEO | | eglove0 -
Will there be an SEO impact if I switch my rich snippets from reviews to votes?
So, we currently have rich snippets showing for reviews on our site. We've made some new product pages that have reviews on them, but they are hidden behind a tab. Because of this our rich snippets haven't been showing in the serps, so we've been looking for a way to get them showing for these new pages. What we've found is that we can change the rich snippets from reviews to votes, which will show an aggregate score on the page, and this will get the snippets appearing in serps again as votes. What we're concerned about is, if we make this change to these new pages, they will automatically change everything on our review pages and all snippets on our sites will change from reviews to votes (not just the new pages). What we want to know is, if we make this change do you think that we may see a negative seo impact (aside from maybe having a lower CTR)? Thanks!
Technical SEO | | davo230 -
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 -
Should I add author markup to sales pages?
Adding author markup to the homepage or to SEO optimised sales landing pages is possible. However it doesn't really seem to be using the feature in the spirit of it's purpose. It makes sense for blog posts. It's possible for other pages and will likely improve CTRs from SERPs. But is it against the spirit of it's purpose?
Technical SEO | | designquotes0 -
How do I get Update Date in SERP snippets?
How do I get Update Date in SERP snippets as opposed to the Date Created?
Technical SEO | | Travis-W1 -
Your opinion on using the markup from schema.org
I am attending SMXEast and one of the speakers is strongly encouraging to use the markup from schema.org. Does anyone have experience with the markup from schema.org and were you able to track any outcome in the search rankings based on adding this markup?
Technical SEO | | irvingw0