SKU on category page products - by stavroch

This topic has 2 replies, 2 voices, and was last updated 8 years, 10 months ago ago by Jack Richardson

  • Avatar: stavroch
    stavroch
    Participant
    January 13, 2016 at 09:17

    How can I display the sku in category products page?

    1 Answer
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    January 13, 2016 at 11:13

    Hello,

    Please add this code in functions.php file:

    add_action( 'woocommerce_after_shop_loop_item', 'prima_custom_shop_item', 5);
    function prima_custom_shop_item() {
    	global $post, $product;
    echo '<p>SKU: '.$product->get_sku().'</p>';
    }

    Best regards,
    Jack Richardson.

  • Viewing 2 results - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.Log in/Sign up

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.