Structured data helps you to present the content of your WooCommerce store. It formats information in a machine-readable format. Google and other search engines use this data to aggregate content.
This snippet creates a simple JSON output and adds Schema.org structured data to your WooCommerce store. It adds a slightly different output for different post types (posts, pages, archives, products).
You can combine the snippet with the use of Yoast SEO. It will take content that you store in Yoast’s meta fields and propagate it to the structured data output.
You can use Google’s structured data testing tool to see if it works.
How to make this snippet work?
- upload the snippet to the functions.php of your child theme
- replace the placeholders in the snippet with your social media links