Woocommerce shortcodes



WooCommerce > 2.1.x Shortcodes:

  • [woocommerce_cart] – shows the cart page
  • [woocommerce_checkout] – shows the checkout page
  • [woocommerce_order_tracking] – shows the order tracking form
  • [woocommerce_my_account] – shows the user account page
If you would like to learn more about the new WooCommerce 2.1 setup, see: Endpoints documentation.

WooCommerce < 2.1.x Shortcodes:

  • [woocommerce_edit_account] – Edit account pages
  • [woocommerce_change_password] – shows the change password page
  • [woocommerce_view_order] – shows the user account view order page
  • [woocommerce_logout] – shows the logout page
  • [woocommerce_pay] – shows the checkout pay page
  • [woocommerce_thankyou] – shows the order received page
  • [woocommerce_lost_password] – shows the lost password page
  • [woocommerce_edit_address] – shows the user account edit address page
[recent_products per_page="12" columns="4"] Recent Products

Featured Products

[featured_products per_page="12" columns="4"]


[product id="99"]
[product sku="FOO"]


[products ids="1, 2, 3, 4, 5"]
[products skus="foo, bar, baz" orderby="date" order="desc"]

Add to Cart

[add_to_cart id="99"]

Add to Cart URL

[add_to_cart_url id="99"]

Product Page

[product_page id="99"]
[product_page sku="FOO"]

Product Category

[product_category category="appliances"]

Product Categories


[product_categories number="12" parent="0"]

Sale Products

[sale_products per_page="12"]

Best-Selling Products

[best_selling_products per_page="12"]

Top Rated Products

[top_rated_products per_page="12"]

Product Attribute↑ Back to Top

List products with an attribute shortcode.


     'per_page' => '12',
     'columns' => '4',
     'orderby' => 'title',
     'order' => 'asc',
     'attribute' => '',
     'filter' => ''

[product_attribute attribute='color' filter='black']

Related Products↑ Back to Top

List related products.


     'per_page' => '12',
     'columns' => '4',
     'orderby' => 'title'

[related_products per_page="12"]

The ‘per_page’ Argument

Please note: the ‘per_page’ shortcode argument will determine how many products are shown on a page. This will not add pagination to the shortcode.

Messed-Up Shortcodes↑ Back to Top

If you correctly pasted your shortcodes and the display looks incorrect, make sure you did not embed the shortcode between <pre> tags. This is a common issue. To remove these tags, edit the page, and click the Text tab:




Wprowadź swoje dane lub kliknij jedną z tych ikon, aby się zalogować:

Logo WordPress.com

Komentujesz korzystając z konta WordPress.com. Wyloguj /  Zmień )

Zdjęcie na Google+

Komentujesz korzystając z konta Google+. Wyloguj /  Zmień )

Zdjęcie z Twittera

Komentujesz korzystając z konta Twitter. Wyloguj /  Zmień )

Zdjęcie na Facebooku

Komentujesz korzystając z konta Facebook. Wyloguj /  Zmień )


Connecting to %s