WooCommerce - excelling eCommerce
Adding SKU on products page/catalog page? (4 posts)

  1. yahboyvinchi
    Posted 1 year ago #

    Here's the link to the website that I'm managing for one of my clients
    My clients would like to have the SKU number shown on the catalog page along with the product name and image. However, instead of "SKU #####", they want it to be "Products #####." Also, they the same thing in the single product page--this, I managed to do by simply leaving the SKU box in the Product Data section (when editing product) and add "Product #####" in the short description. However, I do not know how to show it in the catalog page. Can you please show me how? Thank you!


  2. terrytsang
    Posted 1 year ago #

    hi @yahboyvinchi, you can add below code into your theme functions.php by going to WordPress Admin > Appearance > Editor:

    add_action( 'woocommerce_after_shop_loop_item', 'custom_after_shop_loop_item', 5);
    function custom_after_shop_loop_item() {
      global $post, $product;
      echo '<p>Product: '.$product->get_sku().'</p>';
  3. yahboyvinchi
    Posted 1 year ago #

    @terrytsang thank you so much! It worked like magic! Now on the catalog page, the Product ##### has appeared, as you can see
    Now, is it possible to do this on the single product page?
    My client wants to replace the phrase "SKU" with "Product," so it will show "Product #####" instead of "SKU #####." On the back-end for managing/administrating, it is still the SKU number, but on the front-end for display, it shows "Product." Can you please help me on this? I really appreciate it.

  4. terrytsang
    Posted 1 year ago #

    Hi @yahboyvinchi, if you want to replace all SKU in WooCommerce backend/frontend, i will recommend you use Codestyling Localization plugin, which allows you to translate the plugin directly in the WP admin panel.

    Translation WooCommerce official documentation link here.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WooCommerce - excelling eCommerce
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic