Unlock the Power of WooCommerce Product Shortcodes

Are you struggling to make your WooCommerce store more engaging without dealing with complicated code? Do you want to showcase your WooCommerce products in a way that grabs your customers’ attention? WooCommerce product shortcodes are the key to making your store look more professional and engaging.

Whether you want to highlight best-seller products, showcase sales products, or feature specific product categories, WooCommerce shortcodes make it easy to transform your store into a captivating shopping experience. Let’s explore how you can use these shortcodes to enhance your product displays and boost your sales.

In this article, we’ll guide you through the

  • Understanding WooCommerce product shortcodes
  • Benefits of using Product Shortcodes in WooCommerce
  • Parameters that we can use with Product shortcodes
  • Implementing Various Products shortcodes in Page & Posts

What are WooCommerce Product Shortcodes

WooCommerce Product Shortcodes are simple one-line codes that empower you to add products anywhere on your website. They’re made just for the WooCommerce plugin, which makes your online store work better. These shortcodes act as shortcuts, enabling you to seamlessly integrate product information into your online store without complex coding.

For example, if you want to highlight featured products or ones on sale, you can do that easily, and make them even better using the shortcode parameters.

Whether you want to showcase a specific product, display a limited number of items, arrange products in columns, or filter by unique identifiers like ID and SKU, these parameters give you precise control over the behavior of your product listings. So your website visitors have a good experience when checking out your products.

There are many other WooCommerce shortcodes available to display the checkout form, shopping cart, and more, and you can learn more about them in our detailed article on WooCommerce shortcodes.

Benefits of Using WooCommerce Product Shortcodes

Using WooCommerce product shortcodes can make your online store more attractive & user-friendly. Instead of manually coding product details into your website, shortcodes let you easily insert products anywhere on a page or post just by copying and pasting a simple line of code. These shortcodes allow you to decide which products appear on your site, their order, and how many appear on each page.

It saves you time and effort. Plus, it allows for flexibility in showcasing products exactly where you want them, helping to boost sales by making it easier for customers to find and purchase items. In simple terms, WooCommerce product shortcodes streamline your store’s design and make shopping smoother for your customers.

List of Some WooCommerce Product Shortcodes

In this section, we’ll talk about some product shortcodes that you can use in WooCommerce. These shortcodes help you easily show products in your online store. Here are some examples.

Display WooCommerce Products

[products]

The [products] shortcode is the most powerful and widely used shortcode in WooCommerce. It shows all your products on your website.

WooCommerce Product Shortcodes: Display All Products
WooCommerce Product Shortcodes: Display All Products

Showcase Top-Rated Products

[top_rated_products]

Top-rated products are the ones that customers like the most. Showing these products can help new customers trust your store and see what’s popular. You can use the shortcode to add all your top-rated products in one place, like on your homepage or a particular “Best Sellers” page.

WooCommerce Product Shortcodes: Display Top Rated Products
WooCommerce Product Shortcodes: Display Top Rated Products

Showcase Products Categories

[product_categories]

With this shortcode, you can show your product categories anywhere you want on your website. It’s a helpful way to guide your customers through your range of products.

WooCommerce Product Shortcodes: Display Product Categories
WooCommerce Product Shortcodes: Display Product Categories

WooCommerce shortcodes have many parameters that help you choose which products to show in your online store, improving the customer experience. Below, we discuss the different parameters you can use with product shortcodes.

Parameters Used with WooCommerce Product Shortcodes

Here, we will discuss some parameters you can use with the WooCommerce products shortcode to improve how your products are displayed.

Limit

It decides how many products to display. By default, it will be -1, which shows all products, but you can change that number if you want.

[product limit = "4"]

Category

This parameter shows products that have a specific category slug. If you want to include more than one category, separate them with a comma. We pass the category slugs here, separated by commas.

[products category ="shirts, hoodies"]

You can utilize the CAT operator within the category to perform basic calculations, enabling you to determine which products will be included.

  • AND: Shows products that belong to all of the categories.
  • IN: Shows products that are in the selected category or categories.
  • NOT IN: Shows products that are not in the selected category.
[products category = "shirts, hoodies" cat_operator = "AND"]

You can even change how your product categories look by adding different parameters to the shortcode. Here’s an example:

[product_categories limit="3"]: This will display only 3 categories on the website. 

[product_categories ids = "16, 20, 22"]: It will show the categories with ids 16, 20, and 22.

[product_categories columns="3"]: With this, your categories will be displayed in three columns, making them easy to browse for your customers. 

[product_categories hide_empty="1"]: It hides any categories that don't have any products in them.

Columns

The column parameter decides how many columns you’ll have on your product page. By default, it’s set to 4.

[products columns = "3"]

Order by

This parameter gives you choices to change how your products are ordered. By default, they’ll be ordered by their titles.

You can include multiple options by separating them with space between each one.

  • ID: This will order the products using their Post ID.
  • Date: Products are ordered by publication date, so newer ones come first.
  • Popularity: It is used to order the products by how many times they’ve been bought
  • Rating: This will order the products by their ratings, so the highest-rated ones come first.
[products orderby = "rating"]

Order

Depends on the above “order by” setting determines if the products are listed in ascending (ASC) or descending (DESC) order. By default, they are in ascending order (ASC).

[products order = "ASC"]

ID

You can use this parameter to show specific products or categories based on their IDs. Below are the examples that display products and categories using their IDs. Just replace the numbers with your actual Product and Category IDs.

Use [products ids="64,55"] to display Products based on their ID. 

Use [products _categories ids=”1,2”] to display categories based on their ID.

To find the category ID, navigate to the admin site dashboard, then Products ➝ Categories. Edit any category, and you’ll find the ID in the URL of your browser. For instance, if tag_ID=20, then 20 is the ID of that category.

Find Category ID in WooCommerce
Find Category ID in WooCommerce

Attribute

The parameter will display products with specific attributes.

[products attribute="size"]

Terms

You need to use this with an attribute. It shows products that match certain terms linked to that attribute. For example, if the attribute is size, the terms could be small, medium, or large.

[products attribute="color" terms="red"]

On_sale

This parameter displays a list of products that are currently on sale. You can include them by setting the value to either true or false.

[products on_sale = "true"]

Best_selling

This parameter will display a list of your store’s best-selling products. You can choose between two input value options: true or false.

[products best_selling = "true"]

Exploring the Examples of WooCommerce Product Shortcodes with Parameters

Here, we will discuss the examples and implementation of WooCommerce product shortcodes using the parameters.

Display Products by ID

You can make the shortcode even better by specifying the IDs of the products you want to show and setting the number of columns for display. For instance, if you want to show products with specific IDs and you want them to be displayed in 2 columns, adjust the shortcode like this.

Here, you can replace the product IDs with the IDs of your own products.

[products ids= "64, 55, 52, 43" columns ="2"]
WooCommerce Product Shortcodes: Display Products by IDs
WooCommerce Product Shortcodes: Display Products by IDs

WooCommerce Single Product

Using Product ID

[product id = "64"]

If you want to show a particular product on your webpage or blog post, use the shortcode mentioned above. This shortcode is used to display products with a specific ID. So, when you insert this shortcode, it will automatically show the product associated with the ID 64 wherever you place it on your website.

WooCommerce Product Shortcodes: Display Single Product by ID
WooCommerce Product Shortcodes: Display Single Product by ID

To find the ID of the product you want to display, go to “Products” then “All Products” in your dashboard. Hover your mouse over the product’s name, and you’ll see the ID listed there.

Find Product ID in WooCommerce
Find Product ID in WooCommerce

Using Product SKU

[products skus= "Hoodie-Ninja"]

You can also show a single product using its SKU. Use the shortcode provided above. To find the SKU of your product, go to Products ➝ All products, and choose “Quick Edit” for the product you want. You’ll see the SKU option there.

Find Product SKU in WooCommerce
Find Product SKU in WooCommerce

Display Sale Products

[products limit="4" columns="4" on_sale="true" order_by = "popularity"]

Let’s say you’re having a big sale and want to grab customers’ attention by showing off the most popular sale items. You might want to display a few of these products on your homepage, but you don’t know how to code or hire a developer.

In this case, you can use the above shortcode. With this shortcode, WooCommerce will automatically pick out the most popular sale products based on how many have been sold(popularity).

This shortcode displays 4 of your most popular products currently on sale. It arranges them into 4 columns to make them look great on your website.

WooCommerce Product Shortcodes: Display Sale Products
WooCommerce Product Shortcodes: Display Sale Products

Best Selling Products

[products limit="4" columns="4" best_selling="true" ]

In some situations, you might want to show your most popular products on the homepage, whether on sale or not. You can do that using the shortcode mentioned above.

It will show the top 4 best-selling products, arranged in 4 columns.

WooCommerce Product Shortcodes: Display Best Selling Products
WooCommerce Product Shortcodes: Display Best Selling Products

Featured Products

Featured products are special products in your store that you want to highlight. They might be bestsellers, new arrivals, or any other products you think customers should notice.

To make any product “featured,” go to your admin dashboard, then click on Products ➝ All Products. You’ll see a star icon next to each product. Just click on the star icon for the product you want to feature, as displayed in the below screenshot.

Make WooCommerce Products as Featured
Make WooCommerce Products as Featured
[featured_products limit=”2″ columns=”2″ orderby=”date” order=”ASC”]

To display the featured products on your website, use the above simple shortcode. It will display 2 featured products in 2 columns, ordered by date in ascending order.

WooCommerce Product Shortcodes: Display Featured Products
WooCommerce Product Shortcodes: Display Featured Products

New or Recent Products

[products limit="4" columns="4" orderby="id" order="DESC"]

You might want to show off your newest products on your homepage or shop page right before your main products. This is great for a new season or to help regular customers see what’s new in your store.

This shortcode lists your newest products using their IDs, which WooCommerce creates automatically. It shows the latest products first by sorting them in descending order (DESC). You can also set how many columns the products should be displayed in.

WooCommerce Product Shortcodes: Display Recent Products
WooCommerce Product Shortcodes: Display Recent Products

Display Products Based on Attributes & Terms

[products limit="4" columns = "4" attributes = "brand, size" term = "nike,large"]

If your store sells many products with similar features, you should organize them into groups to make it easier for customers to find what they’re looking for.

For instance, if you want to showcase products from a specific brand and size on your website, you can do this easily with a shortcode. Just create a shortcode that tells WooCommerce to display all products with the specific brand and size you want. This way, you can display these products together, making it easier for customers to find exactly what they want.

This shortcode will display products with the brand attribute terms “Nike” and products with the size attribute terms “Large.”

WooCommerce Product Shortcodes: Display Products based on Attributes & Terms
WooCommerce Product Shortcodes: Display Products based on Attributes & Terms

Display Products Based on Specific Categories

[products category = "clothing"]

Sometimes, you might want to highlight products from a certain category on your homepage or another page. This can be done by using the shortcode provided above. It allows you to display products specifically chosen from a particular category.

[products category = "clothing, music"]: Used to show products from multiple categories.
WooCommerce Product Shortcodes: Display Products based on Categories
WooCommerce Product Shortcodes: Display Products based on Categories

You can also enhance your store easily by using WooCommerce blocks. They’re like building blocks for your website, letting you add cool features without coding. If you find shortcodes confusing, don’t worry! Blocks make it simple to do things like display top-rated, best-selling products and more. Dive into our detailed article to discover more about WooCommerce blocks.

Start Using WooCommerce Product Shortcodes

So, that’s everything covered about WooCommerce product shortcodes! With these valuable shortcodes, you can improve your online store by showing customers exactly what you want them to see, boosting your sales.

We covered what shortcodes are, why they matter, and how to implement WooCommerce shortcodes correctly. Hopefully, this complete guide has been helpful for your online shop, giving you the knowledge you need to succeed in eCommerce.

Leave a Reply

Your email address will not be published. Required fields are marked *