WooCommerce accompanies different shortcodes that can be utilized to put content inside posts and pages. All shortcodes work effectively just when they are appropriately inserted. Kindly carefully insert WooCommerce shortcodes.
How to use shortcodes
Where to use it?
Shortcodes can be used on the pages and posts in WordPress. On the block editor that you are using the shortcode manager, there is a shortcode block you can use to paste the shortcode in.
If you are using the classic editor, you will have to paste the shortcode on the page or post.
Args (or Arguments)
A few of the shortcodes below will refer to “Args”. These are approaches to make the shortcode more explicit.
WooCommerce Shortcodes for Page
Below the following shortcode for WooCommerce pages:
1. Cart Page: Woocommerce cart shortcode shows cart content and coupon codes and other cart details.
2. Checkout Page: Woocommerce checkout shortcode shows the checkout process detail.
3. Order Tracking: Woocommerce order tracking shortcode permits the client to see the situation with the order by entering their order details.
4. User Account: Woocommerce my account shortcode shows the ‘my account’ area where the client can see past requests and update their detail.
Woocommerce products shortcodes
The Woocommerce product shortcode is the most significant. These [products] shortcodes permit you to show items by post ID, random sorting, categories, attributes, with support for pagination, SKU, and product tags, replacing the need for multiples shortcodes such as [best_selling_products], [featured_products], [product_attribute], [sale_products], [recent_products], and [top_rated_products] and many more.
1. Recent Products: It shows the arrangements of recent products added to your WooCommerce site. It is exceptionally helpful on the landing page for the show late items. The ‘per_page’ shortcode decides the number of items to show on the page. The sections trait controls the number of segments show on-page for products.
|[recent_products per_page=”12″ columns=”4″]|
2. Featured Products: It works equivalent to recent products yet shows items that have been set as “featured”. The shortcode is saying: Show 12 highlighted items in 4 segments in succession.
|[featured_products per_page=”12″ columns=”4″]|
- Product: Show a single product by ID and SKU.
- Products: Show multiple products by ID and SKU.
|[products ids=”2321, 2287, 2286, 2285″]|
|[products skus=”Woo-beanie-logo, woo-polo, woo-long-sleeve-tee, woo-hoodie-with-zipper” orderby=”date” order=”desc”]|
Product Category shortcodes
These two WooCommerce category shortcodes will show your product categories on any page.
- [product_category] – Display a specified product category.
- [product_categories] – Display all your product categories.
Product Category: Use the code to show different products in a category by slug.
I trust this article assists with knowing you about some more WooCommerce shortcodes. On the off chance that if you have any further inquiries, be glad to ask me within the feedback part below.