Title: Creating custom schema
Last modified: March 8, 2019

---

# Creating custom schema

 *  Resolved [Wild Jim](https://wordpress.org/support/users/smokingblends/)
 * (@smokingblends)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/creating-custom-schema/)
 * On single products we are still getting these warnings. Global Identifier is 
   new I believe.
    global identifier, brand, offerCount
 * I have looked over your documentation regarding creating custom schema here.
   
   [https://github.com/woocommerce/woocommerce/wiki/Structured-data-for-products](https://github.com/woocommerce/woocommerce/wiki/Structured-data-for-products)
 * 1. Where do you put the code? We would rather not use another plugin and unfortunately
   we can not get a child theme to work at this time.
 * 2. Here is the example code that sets the sku to product id.
    How would you be
   able to set it for global identifier or brand if there is nothing to set it to?
 * add_filter( ‘woocommerce_structured_data_product’, function( $markup, $product){
   
   $markup[‘sku’] = $product->get_id(); // Set sku to product id. return $markup;});
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcreating-custom-schema%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * (@phillipwoo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/creating-custom-schema/#post-11354586)
 * Hello [@smokingblends](https://wordpress.org/support/users/smokingblends/),
 * I understand that you don’t want to use another plugin, but what if it was super-
   easy to use and would allow you to use it in a myriad of ways? I am talking about
   a free plugin in the repository called Code Snippets ([https://wordpress.org/plugins/code-snippets/](https://wordpress.org/plugins/code-snippets/)).
 * Adding the code you have above to this plugin will allow you to implement your
   custom code without it being overwritten during an update. Please give it a try
   and see if it allows you to make the updates you would like to.
 * All the best!
 *  Thread Starter [Wild Jim](https://wordpress.org/support/users/smokingblends/)
 * (@smokingblends)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/creating-custom-schema/#post-11354754)
 * [@phillipwoo](https://wordpress.org/support/users/phillipwoo/)
 * We have a working Child Theme now. Can we use that? Do you have a good tutorial
   for how to create a code for the specific issues? Where would you put the code
   via a child theme?
 * What we were hoping to do here is get some people to collaborate on this. Everyone
   using this cart is experiencing the same warning and this should be easy to resolve
   via custom code.
 *  [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * (@phillipwoo)
 * [7 years, 2 months ago](https://wordpress.org/support/topic/creating-custom-schema/#post-11357880)
 * Yes, you can! You can add the code you want to the child theme’s functions.php
   as well. Here’s more information on how to use a child theme functions.php:
 * [https://developer.wordpress.org/themes/advanced-topics/child-themes/#using-functions-php](https://developer.wordpress.org/themes/advanced-topics/child-themes/#using-functions-php)
 * Please let me know how this works for you.
 * Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Creating custom schema’ is closed to new replies.

 * ![](https://ps.w.org/woocommerce/assets/icon.svg?rev=3234504)
 * [WooCommerce](https://wordpress.org/plugins/woocommerce/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/woocommerce/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/woocommerce/)
 * [Active Topics](https://wordpress.org/support/plugin/woocommerce/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/woocommerce/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/woocommerce/reviews/)

## Tags

 * [customization](https://wordpress.org/support/topic-tag/customization/)

 * 3 replies
 * 2 participants
 * Last reply from: [Phillip C. a11n](https://wordpress.org/support/users/phillipwoo/)
 * Last activity: [7 years, 2 months ago](https://wordpress.org/support/topic/creating-custom-schema/#post-11357880)
 * Status: resolved