Home › Forums › WoodMart support forum › microdata in custom product page
microdata in custom product page
- This topic has 7 replies, 3 voices, and was last updated 3 years, 5 months ago by
Artem Temos.
-
AuthorPosts
-
June 19, 2022 at 8:07 pm #384431
giorgio0033ParticipantHello, i just noticed a strange problem. If i use “layouts” to creat a custom product page, then product’s microdata are not working. This creats a huge seo problem. I checked a random product page from your demos with custom layout https://woodmart.xtemos.com/megamarket/product/face-mirror/ and the problem was there also.
Is there any solution for that?June 20, 2022 at 12:19 am #384463
Elise NoromitMemberHello,
Could you kindly describe the actions step by step to reproduce the issue?
If you have any questions please feel free to contact us.
Best Regards
June 20, 2022 at 11:10 am #384561
giorgio0033Participanthello, i will give you example so you can understand what i mean. if you check with google structured data testing tool an old product page of your demo eg. https://woodmart.xtemos.com/shop/other/electronics-2/convallis-mattis-parturient/demo/electronics-2/ you will see that google recognizes this page as a product page.
If you check a new product with custom layout eg. https://woodmart.xtemos.com/megamarket/product/granite-wall-tile/ you will see that google does not recognize it as product page.
i am sending you links of the test results:
new product with custom layout: https://validator.schema.org/#url=https%3A%2F%2Fwoodmart.xtemos.com%2Fmegamarket%2Fproduct%2Fgranite-wall-tile%2F
old product with default layout: https://validator.schema.org/#url=https%3A%2F%2Fwoodmart.xtemos.com%2Fshop%2Fother%2Felectronics-2%2Fconvallis-mattis-parturient%2Fdemo%2Felectronics-2%2F
PLEASE FIX THAT. THIS IS HUGE SEO PROBLEM
June 20, 2022 at 11:42 am #384585
Artem TemosKeymasterHello,
To fix this issue you need to edit the file
woodmart/inc/modules/layouts/class-single-product.phpand add the code as shown on the screenshot. https://gyazo.com/00859d87e98e1571a8340770d506e9d4<?php if ( function_exists( 'WC' ) && is_object( WC()->structured_data ) ) : ?> <?php WC()->structured_data->generate_product_data(); ?> <?php endif; ?>Kind Regards
June 20, 2022 at 2:58 pm #384645
giorgio0033ParticipantHello,
thank you for the fix, but i have to ask. After a theme update will not this fix get lost?June 20, 2022 at 4:35 pm #384685
Artem TemosKeymasterYes, we will fix this in our next theme update also.
Kind Regards
June 20, 2022 at 6:23 pm #384732
giorgio0033Participantgreat, thank you
June 21, 2022 at 9:28 am #384867
Artem TemosKeymasterYou are welcome! Feel free to contact us if you have any further questions.
Kind Regards
-
AuthorPosts
The topic ‘microdata in custom product page’ is closed to new replies.
- You must be logged in to create new topics. Login / Register
