Looking for a comprehensive guide to using WooCommerce Shortcodes?

Look no further!

First things first are the pages WooCommerce creates when first installed and activated, if everything went well then you won’t have a need for these next shortcodes. But, as you’re using WordPress it’s highly likely a few things need some manual intervention. WooCommerce should create 11 preconfigured pages for your cart, checkout, etc. However, if it doesn’t, you accidentally deleted one or you’re just naturally curious here are the 11 shortcodes for creating dedicated WooCommerce pages: NB: When copying shortcodes, be sure to paste without formatting, so Cmd+Shift+V on a Mac or Ctrl+Shift+V on Windows.

  • [[woocommerce_cart]] – This will show the customers’ cart.
  • [[woocommerce_checkout]] – This will show the checkout page.
  • [[[woocommerce_pay]]] – This will show the Checkout -> Pay Page, used for some gateways.
  • [[[woocommerce_thankyou]]] – This shows the Order Received page, put your conversion tracking codes here!
  • [[woocommerce_order_tracking]] – This shows the Order Tracking page.
  • [[woocommerce_my_account]] – This will display the My Account Page.
  • [[[woocommerce_edit_address]]] – This page allows customers to edit their billing and shipping addresses.
  • [[[woocommerce_view_order]]] – This page allows customers to view individual order details.
  • [[[woocommerce_change_password]]] – Allows the customer to change their password.
  • [[[woocommerce_lost_password]]] – This page will display a lost password form.
  • [[woocommerce_logout]] – This will display a logout link.

It should be noted that some of these shortcodes can be combined, for example you could set up a settings page with [[[woocommerce_edit_address]]],  [[[woocommerce_change_password]]], [[woocommerce_logout]] for convenience.
When you install WooCommerce you’ll also find a new icon in your WYSIWYG editor (the post/pages editor), which will look very much like this: woocommerce-shortcode-kitchen-sink If you click on it you’ll find a drop down list of the various shortcodes specific to WooCommerce:

WooCommerce Shortcode Dropdown

Product Price/Cart Button

When you click this option you’ll see the following shortcode added to your editor: [[add_to_cart id=”” sku=””]]. This can be used to show the price and add to cart button for a singular product, wither by id or SKU. It also allows a style=”” argument to apply custom CSS. You can find the id of a product by navigating to the products page in your WP admin and hovering over the product in question, you’ll see a greyed out id number.

Product By SKU/ID

Clicking this option will place this shortcode into your editor: [[product id=”” sku=””]]. This is fairly self explanitory and will display a singular product with specific id or SKU, e.g.

  • [[product id=”97″]]
  • [[product sku=”ww-monthly”]]

Products By SKU/ID

Very similar to the previous example, this will output multiple products and insert this shortcode: [[products ids=”” skus=””]]. You can also apply the following arguments; order=” “, columns=” “, orderby=” “. For example this shortcode: [[products ids=”1, 2, 3, 4, 5, 6, 7, 8, 9, 10″ columns=”2″ order=”asc” orderby=”date”]] would output 10 products in 2 columns ordered by date in ascending order. You can also use desc for descending and title for ordering.

Product Categories

Product categories will display the product categories loop and output this shortcode: [[product_categories number=””]].  Specifying a number will output that many categories. There are 7 more arguments you can apply to this shortcode:

  • number‘ => ‘null‘, – This determines the number of categories.
  • orderby‘ => ‘name‘, – This determines the order, “name” and “date” are valid options.
  • order‘ => ‘ASC‘, – Determines how product categories are ordered, “ASC” or “DESC“.
  • columns‘ => ‘4′, – The number of columns categories are arranged into.
  • hide_empty‘ => ‘1‘, – Set to 1 to hide categories with no products or to show them.
  • parent‘ => ”, – Set to 0 to only display top-level categories.
  • ids‘ => ” – ids can be set to only output those specified.

Product Categories by Slug

This will output the shortcode: [[product_category category=”” per_page=”12″ columns=”4″ orderby=”date” order=”desc”]]. Similar to product categories but this will output all products within the specified category and can be arranged with the per_page=”” and columns=”” parameters. The category slug can be found by navigating to the product menu in your WP admin and clicking on categories where you’ll see a list of all available categories and corresponding slugs.

Recent Products

Recent Products will output, strangely enough, recently added products. The shortcode will look like this: [[recent_products per_page=”12″ columns=”4″ orderby=”date” order=”desc”]]. All arguments are output by default and have the same options as previous examples.

Featured Products

Featured products is identical to recent products, except it will output products that have been marked favourite, rather than recently added products. The shortcode is: [[featured_products per_page=”12″ columns=”4″ orderby=”date” order=”desc”]].

Sale Products

This and the next few shortcodes are not listed under the Woo icon, we’re not sure why, but there’s not much we can do about it! [[sale_products]] outputs your products currently on sale and can be adjusted with the following arguments:

  • per_page‘ => ’12’,
  • columns‘ => ‘4‘,
  • orderby‘ => ‘title‘,
  • order‘ => ‘asc

Best Selling Products

To output your best selling products you can use this shortcode: [[best_selling_products]], this shortcode only accepts the following arguments though:

  • per_page‘ => ‘12‘,
  • columns‘ => ‘4

Top Rated Products

If you use the ratings and reviews feature built into WooCommerce then this shortcode can be quite useful for displaying your best products; [[top_rated_products]]. It can be altered with the following arguments:

  • per_page‘ => ‘12‘,
  • columns‘ => ‘4‘,
  • orderby‘ => ‘title‘,
  • order‘ => ‘asc

Related Products

Whilst most themes will include a related products area in single product listings, you may want to make use of this shortcode for more custom uses. [[related_products]] will output related products. You can use the following arguments:

  • per_page‘ => ‘12‘,
  • columns‘ => ‘4‘,
  • orderby‘ => ‘title


Access all documentation! Just head on over here. You can find all of the available documentation and procedures for all Woocommerce Extensions and Woo themes Premium Plugins & Themes.