Tagged: Feed, Google, woocommerce
-
AuthorPosts
-
October 10, 2016 at 8:06 pm #697532
Hello,
I’ve had someone ask me to add a line of code to their site for Google microdata for condition. How would I go about adding this to the theme?
Thank you,
ChrisOctober 10, 2016 at 9:05 pm #697546Hey ind-image,
Unfortunately it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However if its really important for you to get this done, you can always hire a freelancer to do the job for you :)
Best regards,
BasilisOctober 10, 2016 at 9:19 pm #697551Hi Basilis,
Any plugins out there that can do the job? I tried searching but found nothing, not sure if you are aware of any. If not, thanks for your quick response and the link for customization’s!
Thank you,
ChrisOctober 11, 2016 at 8:49 am #697677Hi Chris,
I’m not aware of any unfortunately, and if you couldn’t find any when searching I’m guessing there are none out there.
What is the code you are looking to add and where though?
Best regards,
RikardOctober 11, 2016 at 2:48 pm #697891Hi Rikard,
Here is the email I received from my client;
————————————————————–
“We have a couple of warnings on our Google Product Feed. I have someone working on this (the author of the post below) and he has access to our site, but I need some help to add some code to our WP theme. Can you do this update?
Microdata :
It looks like the theme developer needs to be contacted as the standard theme microdata is missing this information. I recommend contacting the theme developer, to update the theme to include microdata for condition
For missing microdata for condition you only need to add 1 line of code which is explained in the following article/Could you look and see if you can do this for us?”
————————————————————–
This looks like the code that needs to be added after clicking on the link but I’m not exactly sure where to add it. I’m assuming they need it for the online store;
<meta itemprop=”itemCondition” itemtype=”http://schema.org/OfferItemCondition” content=”http://schema.org/NewCondition” />Thank you,
ChrisOctober 13, 2016 at 8:06 am #698600Hey!
Where do you need to add this? Is it a WooCommerce product page? If it is a meta info, you can try the “wp_head” hook.
// https://codex.wordpress.org/Plugin_API/Action_Reference/wp_head#Examples
Best regards,
IsmaelOctober 14, 2016 at 7:13 pm #699273Hi Ismael,
I just received another email from my client that is working with a Google expert, Emmanuel Flossie. They tried to add the code, but it didn’t work. Here’s the last email Emmanuel sent me regarding this;
———————–
It’s a very complicated theme you have. I recommend asking the developer to update the theme, as this will affect all his customers.
You can direct him to my page to understand which microdata is missing.Kind regards, Emmanuel
———————-Even if you guys can’t do anything at the moment, please checkout his page, maybe this will help Enfold in the future.
Thanks to all of you!!!!
Chris BrileyOctober 18, 2016 at 8:08 am #700432Hi!
Are you working on a WooCommerce site? The instructions in the page is not clear because the author didn’t define where to add the snippet. There are available instructions for magento, opencart, osCommerce and shopify but nothing about WordPress or WooCommerce. Note that the theme has its own basic schema markup. You can find these markups in the includes > helper-markup.php file.
Regards,
IsmaelOctober 18, 2016 at 2:42 pm #700665Hi Ismael,
I will send your response to my client and let you know what they say.
Thank you!
ChrisOctober 20, 2016 at 5:09 am #701624Hey!
Alright. Let us know if you need more help regarding the issue.
Best regards,
IsmaelMarch 24, 2017 at 2:49 am #765826Hi Ismael,
My client is having a similar issue with his Google Merchant feed with the following :
"Your item's landing page is missing microdata for the item's condition"
Is there an update to this.
We have just implemented the following method:
https://wordpress.org/support/topic/how-to-add-missing-microdata-for-condition-to-products/
`<meta itemprop=”url” content=”https://www.domain.com/shop/product”>
<meta itemprop=”itemCondition” content=”http://schema.org/NewCondition”>`
and also ready through the link
https://feedarmy.com/kb/google-shopping-missing-microdata-for-condition/However feedarmy suggest that the micodata be contained within an “offer”
`<div itemscope itemtype=”http://schema.org/Product”>
<div itemprop=”offers” itemscope itemtype=”http://schema.org/Offer”>
<meta itemprop=”itemCondition” itemtype=”http://schema.org/OfferItemCondition” content=”http://schema.org/NewCondition” />
</div>
</div>`
Enfold Scheme markup does not follow this method.
<meta itemprop="itemCondition" content="http://schema.org/NewCondition">
VS
<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />
the last one includes “OfferItemCondition”
so I have implement this using the wordpress.org method.
However it would be great to get feedback from support as to a Hook or filter to properly implement changes to this
theme > enfold > includes > helper-markup.php
from the child theme.
Interesting article: https://longren.io/add-schema-org-markup-to-woocommerce-products/
I also can’t find any official feedback from woo commerce regarding microdata – I know this is not the right place to comment – but why is “itemCondition” standard with woocommerce ?
March 31, 2017 at 5:53 am #769720Hi,
Thank you for the info.
I’m not sure where you have to put these markups but if you want to insert it inside the single product page or pages with the itemtype “Product”, please try the following hook.
add_action( 'woocommerce_before_single_product_summary', 'ava_product_condition_schema_markup', 1 ); function ava_product_condition_schema_markup() { $output = '<div itemprop="offers" itemscope itemtype="http://schema.org/Offer">'; $output .= '<meta itemprop="itemCondition" itemtype="http://schema.org/OfferItemCondition" content="http://schema.org/NewCondition" />'; $output .= '</div>'; echo $output; }
You might need to apply different types of “condition” (new, used, refurbished) to different products. If that is the case, use the custom field and the get_post_meta function then use it to manipulate the “condition” types.
Best regards,
IsmaelApril 3, 2017 at 1:19 am #770818Thanks Ismael
April 3, 2017 at 3:52 am #770850 -
AuthorPosts
- You must be logged in to reply to this topic.