Creating custom schema
-
On single products we are still getting these warnings. Global Identifier is new I believe.
global identifier, brand, offerCountI have looked over your documentation regarding creating custom schema here.
https://github.com/woocommerce/woocommerce/wiki/Structured-data-for-products1. 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 to see the link]
- The topic ‘Creating custom schema’ is closed to new replies.