[Snippet] Add Schema.org Structured Data for WooCommerce

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

Get the Snippet

Find this snippet on Github.

Need Help?

Please let us know in the comments if the snippet does not work for you or if you need any help.

Share on whatsapp
Share on email
Share on facebook
Share on twitter
Share on linkedin

About the author


Join the discussion about ‘Add Schema.org Structured Data for WooCommerce’

Leave a Reply