add a SKU code at Product Data, General Tab..
use woocommerce template files (add a woocommerce folder and copy select files from the woocommerce/templates folder)
for this, the file you need to edit is content-product.php
Wherever you want to add it:
echo ‘<div class=”sku”>’ . $product->sku . ‘</div>’;
or you could add this to your theme’s functions.php
add_action( ‘woocommerce_after_shop_loop_item_title’, ‘shop_sku’ );
function shop_sku(){
global $product;
echo ‘<span itemprop=”productID” class=”sku”>SKU: ‘ . $product->sku . ‘</span>’;
}
Thread Starter
caeto
(@caeto)
thanks bheadrick look this link
http://www.kingcargo.com/beta/product-category/punch/
I add this:
echo '<div class="sku">' . $product->sku . '</div>';
to the content-product.php
but is not working
[Moderator Note: Please post code or markup snippets between backticks or use the code button. As it stands, your posted code may now have been permanently damaged/corrupted by the forum’s parser.]
Thread Starter
caeto
(@caeto)
thanks bheadrick !! great man
how can I get the SKU to show up on my product pages?