Viewing 6 replies - 1 through 6 (of 6 total)
  • 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
    https://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

    Chef Jeff

    (@adminfoodsaving)

    how can I get the SKU to show up on my product pages?

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show the SKU in the catalog page’ is closed to new replies.