Site icon DDGPRESS

WooCommerce Shortcodes

Woocommerce Shortcodes

WooCommerce comes with various shortcodes that can be used to put content inside posts and pages. All shortcodes work correctly only when they are properly inserted. Please carefully insert WooCommerce shortcodes.

WooCommerce Shortcodes for Page

Below the following shortcode for WooCommerce pages:
a) Cart Page: Woocommerce cart shortcode displays cart content and coupon codes and other cart objects.

[woocommerce_cart]

b) Checkout Page: Woocommerce checkout shortcode displays the checkout process.

[woocommerce_checkout]

c) Order Tracking: Woocommerce order tracking shortcode allow the user to see the status of the order by entering their order details. best-watches.xyz

[woocommerce_order_tracking]

d) User Account: Woocommerce my account shortcode shows the ‘my account’ section where the customer can view previous orders and update their detail.

[woocommerce_my_account]

Woocommerce products shortcode

The Woocommerce products shortcode is these most important shortcodes. These [products] shortcodes allow you to display products by post ID, SKU, categories, attributes, and more. See below some shortcodes examples:

Recent Products

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

It shows the lists of most recent products added to your WooCommerce site. It is very useful on the homepage for show recent products. The ‘per_page’ shortcode determines how many products to show on the page. The columns attribute controls how many columns show on-page for products.

Featured Products

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

It works the same as recent products but displays products that have been set as “featured”. In this above example, the shortcode is saying: Show 12 featured products in 4 columns in a row.

Product: Show single product by ID or SKU. www.copyswiss.cc

[product id="89"]
[product sku="F011"]

Products: Show multiple products by ID or SKU.

[products ids="1, 2, 3, 4, 5"]
[products skus="port23, york21, bag22" orderby="date" order="desc"]

Product Category shortcodes

These two WooCommerce category shortcodes will display your product categories on any page.
[product_category] – Display a specified product category.
[product_categories] – Display all your product categories.

Product Category: Use the below code to show multiple products in a category by slug.

[product_category category="motorola"]

Product search functionality

[woocommerce_product_search]

It creates a simple search facility anywhere on a page. It shows you instant search results that match searching criteria. It is very useful to help your users while they are trying to search for any product on your website.

There are many more shortcodes which we will be discussing later. You may also want to read our complete article on how to fix the WooCommerce thumbnail gallery error after updating the WooCommerce plugin, fix the structure breaking issue in WooCommerce compatible theme, and resize Woocommerce product image size.

I hope this article helps to know you about some more WooCommerce shortcodes. If in case you have any further questions, be happy to ask me within the feedback part below.

If you liked our articles, please subscribe to our YouTube Channel for WordPress Video Tutorials. You can also find us on social media platforms like Twitter and Facebook.

Exit mobile version