Have you found
you're looking for?
10% DISCOUNT for any theme!

How to Display Products Using Product ID and SKU

From this tutorial you’ll learn how to display products using product ID and SKU in WooCommerce templates.

Adding Products Using Product ID and SKU
  1. First, you need to access your WordPress Dashboard. Here locate Posts or Pages tab on the left and navigate to Add New in order to add a new page (post).
  2. You need to add the following shortcode to the content field of the page editor to display the single product using its ID.
    [product id="99"]

  3. If you don’t know how to find out the product ID, you need to navigate to Products tab and hover on the product you want to display by ID. At the bottom of the page, you’ll see the ID number.
  4. Let’s find out how to display a single product using SKU. Just add the following shortcode to the content field.
    [product sku="FOO"]
  5. To learn the product SKU navigate to Products, open the one you want to add, and in the Product Data block you’ll see the SKU number. If there is none, just create it.
  6. To display several products using SKU numbers paste this shortcode to your post or page content area.
    [products skus="foo, bar, baz" orderby="date" order="desc"]
  7. There is also a way to display multiple products by product ID number. To do it you need to paste the following shortcode into the page or post content field.
    [products ids="1, 2, 3, 4, 5"]
  8. Now you know how to add single product and multiple products to your website’s pages.