WordPress.org

Support

Support » Plugins and Hacks » WooCommerce » [Resolved] Show the SKU in the catalog page

[Resolved] Show the SKU in the catalog page

Viewing 6 replies - 1 through 6 (of 6 total)
  • rhonz10

    @rhonz10

    add a SKU code at Product Data, General Tab..

    bheadrick

    @bheadrick

    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>’;

    bheadrick

    @bheadrick

    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>’;
    }

    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.]

    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 ‘[Resolved] Show the SKU in the catalog page’ is closed to new replies.
Skip to toolbar