WooCommerce Shortcode

WooCommerce shortcodes you definitely need to know

With over 15 million downloads on WordPress.org, WooCommerce is the popular e-commerce plugin among WordPress community. If you’re developing theme for WooCommerce, there are few shortcodes that might help you in theme development.

Here are our list of  WooCommerce shortcodes, you might not be aware of but definitely need to know for better theme customization.

  1. Recent Products
    This shortcode is helpful if you want to display recent product in homepage.
    Example:

    You can pass arguments in shortcode to change number of product you want to display, order of product and columns.
    Example:
  2. Best Selling Products
    This shortcode is used to display best selling product in store.
    Example:
  3. Featured Products
    This shortcode is used to display those products which has been set as a “featured”.
    Example:
  4. Top Rated Products
    This shortcode is used to display top rated products on sale in store.
    Example:
  5. Attribute Based Products
    This shortcode is used to display products based on attribute. You can filter product based on attribute value.
    Following example displays product based on attribute “size” and filtered with value “large”.
    Example:
  6. Products on sale
    This shortcode is used to display products that are on sale.
    Example:
  7. Category Based Products
    This shortcode is used to display multiple products based on category slug. You can check categories slug by navigating to Products > Categories in WordPress admin menu.
    Following example displays product based on category “T-shirt” whose slug is “tshirt”.
    Example:

Furthermore, you can find other list of shortcode on WooCommerce docs: https://docs.woothemes.com/document/woocommerce-shortcodes/