I have a script for rich snippets in json-ld. How to add those scripts to Product Page in Magento 2?
2
Magento 2 (2.3) already implemented rich snippets on Product Page (Offer and Aggregated Rating). Before add own snippets, you need remove old markup.
Add json-ld script you can in any product template, for example vendor/magento/module-catalog/view/frontend/templates/product/view/additional.phtml.
vendor/magento/module-catalog/view/frontend/templates/product/view/additional.phtml
Native and essential RS (schemas) are described here: https://mirasvit.com/blog/magento-2-essential-rich-snippets.html
Click here to cancel reply.
2
Answers
You can see more example here: https://paulnrogers.com/guide-to-adding-rich-snippets-in-magento/
Magento 2 (2.3) already implemented rich snippets on Product Page (Offer and Aggregated Rating). Before add own snippets, you need remove old markup.
Add json-ld script you can in any product template, for example
vendor/magento/module-catalog/view/frontend/templates/product/view/additional.phtml
.Native and essential RS (schemas) are described here: https://mirasvit.com/blog/magento-2-essential-rich-snippets.html