Support » Theme: Woostify » Add sku to product archive

  • Resolved teleputer

    (@teleputer)


    I would like to be able to add a SKU number on the product archive page. Any idea how I might be able to accomplish this?
    I found this file woostify-woocommerce-archive-product-functions.php But unable to correctly add the SKU number.
    I guess I need to add a filter of some kind?
    Thank you for your help!!

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Theme Author Dylan Ngo – Woostify

    (@duongancol)

    Hi!
    You can use the code below

    add_action( 'woocommerce_after_shop_loop_item_title', 'woostify_custom_sku_product_page', 20, 1);
    function woostify_custom_sku_product_page( $template )  {
    	global $product;
    	$sku = $product->get_sku();
    	echo $sku;
    }
    Thread Starter teleputer

    (@teleputer)

    Thank you!!
    I had to change the 20,1 to 10,1 and it worked. Strange.
    Again thank you so much!!
    Steve

    • This reply was modified 5 months, 1 week ago by teleputer.
    Theme Author Dylan Ngo – Woostify

    (@duongancol)

    You are welcome.
    Don’t forget to rate the theme if you like it.

    Have a great weekend!

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.