Want to insert a live product search within a blog or webpage? Simple, just use WooCommerce shortcodes. In short, this WooCommerce feature allows you to display your online store information such as your top-selling products, displaying the shopping cart, and much more differently.
Here’s everything that you need to know about WooCommerce plugin shortcodes.
What are Shortcodes?
As the name suggests, a shortcode is a snippet of code that is used to perform a specific action. Shortcodes are commonly used in WordPress and can be placed anywhere on a WordPress webpage, post, or within a widget.
In WordPress, shortcodes follow the same simple format where a short piece of text is placed within two brackets. Here’s how: [shortcode]
Shortcodes are also used in various WordPress plug-ins and themes. In this case, the shortcode is prefaced by the name of the plug-in or theme. For example: [plugin_shortcode]
Now that you know what shortcodes are, let’s move on to understanding shortcodes in WooCommerce.
What are WooCommerce Shortcodes?
WooCommerce shortcodes are designed to work with the WooCommerce plug-in. Shortcodes provide a simple way to insert WooCommerce-related functionalities into any WordPress page or post.
Shortcodes can be used to display several WooCommerce-related functionalities such as:
- Products
- Shopping cart
- Checkout page
- User account
- Order tracking
To display a WooCommerce shortcode, you need to preface the shortcode with “woocommerce.” For example: Your cart is currently empty.
demonstrates the user’s shopping cart. On a similar note,
displays the store’s checkout page.
Now, let us look at why WooCommerce shortcodes are important for eCommerce store owners?
Why Should You Use WooCommerce Shortcodes?
WooCommerce shortcodes are the easiest way to customize or bring a “fresh” look to your WooCommerce store. For example, you can add your “top selling products” to your homepage or pages where interested shoppers visit your store. WooCommerce shortcodes can also be used to facilitate the user’s shopping experience on your online store. For example, an “Add to Cart” button can be placed on any product page to make it easier for the shopper to buy that product.
In short, WooCommerce shortcodes can be used to optimize your online store for better customer experience and improve conversions and revenues.
How Do WooCommerce Shortcodes Work?
As mentioned before, a WooCommerce shortcode is a short snippet of text separated by underscores. While some of the WooCommerce shortcodes can function on their own, other shortcodes require additional parameters. Effectively, parameters are extra lines of code that are used to make the action more specific. For instance, if you add the parameter on_sale=”true” to a product shortcode, only products that are available for sale will be displayed.
Here are some more examples of WooCommerce shortcodes with parameters:
- 353 sold
₹2149 / yr
CF7 Plugin for Google Maps
Easily integrate google map inside Contact Form 7 as a form field and get user location easily.
605 sold₹2149 / yr
Was This Helpful Pro
Get site visitor's feedback for your blog post & pages using beautiful Like / Dislike buttons. Improve your blog content quality.
548 sold₹2149 / yr
WC Store Locator Pro
Display your stores beautifully on google maps & allow visitors to find the nearest store from their location.
1818 sold₹2149
WooCommerce Delivery Area Pro
Allow visitors to check whether a product is available for delivery in a particular area or not.
350 sold₹2149 / yr
WooCommerce eCard pro
A WooCommerce plugin to create & sell ecards on your WP site. Allow customers to send personalised ecards.
642 sold₹2149 / yr
WooCommerce Reminder pro
Send pending payment reminders, before delivery notification and ask product review reminder emails & sms.
386 sold₹2149 / yr
WP Age Gate Pro
Apply age restriction to posts, pages, custom posts type or woo-commerce categories.
353 sold₹2149 / yr
WP Core Emails Pro
Change default WordPress emails. Easy way to change sender’s name and email information.
380 sold₹2149
WP Display Files Pro
Display File and Folder Listings from Cloud Storage like Google Drive, Box Cloud, Dropbox, Amazon AWS S3 and Web Server.
139 sold₹2149 / yr
WP GDPR PRO
This plugin covers cookies consent, delete my account, request data, erasure data and data breach notifications.
This will show a total of 10 products in a grid format with 5 columns.
This is used to display all the specified product categories.
This is used to display an “Add to Cart” button for the product with the specified product ID.
- 1818 sold
₹2149
WooCommerce Delivery Area Pro
Allow visitors to check whether a product is available for delivery in a particular area or not.
815 sold₹2149 / yr
WP Posts Pro
To display blog posts listing without any programming, just create Rules & Layouts and display them on widgets or pages easily.
642 sold₹2149 / yr
WooCommerce Reminder pro
Send pending payment reminders, before delivery notification and ask product review reminder emails & sms.
605 sold₹2149 / yr
Was This Helpful Pro
Get site visitor's feedback for your blog post & pages using beautiful Like / Dislike buttons. Improve your blog content quality.
548 sold₹2149 / yr
WC Store Locator Pro
Display your stores beautifully on google maps & allow visitors to find the nearest store from their location.
386 sold₹2149 / yr
WP Age Gate Pro
Apply age restriction to posts, pages, custom posts type or woo-commerce categories.
380 sold₹2149
WP Display Files Pro
Display File and Folder Listings from Cloud Storage like Google Drive, Box Cloud, Dropbox, Amazon AWS S3 and Web Server.
353 sold₹2149 / yr
WP Core Emails Pro
Change default WordPress emails. Easy way to change sender’s name and email information.
353 sold₹2149 / yr
CF7 Plugin for Google Maps
Easily integrate google map inside Contact Form 7 as a form field and get user location easily.
350 sold₹2149 / yr
WooCommerce eCard pro
A WooCommerce plugin to create & sell ecards on your WP site. Allow customers to send personalised ecards.
This will display your 10 top-selling products in a grid with two columns.
Next, let us see how you can get a WooCommerce shortcode for your WordPress website.
How Can I Get WooCommerce Shortcodes?
For WordPress users, there are many plug-ins available to install a WooCommerce shortcode. However, the best mode of getting a WooCommerce shortcode feature is by installing the WooCommerce Shortcodes plug-in. This WooCommerce Shortcodes plugin is available for WordPress 3.9 (or later) and WooCommerce 2.0 (or later).
Once this plug-in is installed and activated, you can use a “TinyMCE” drop-down list to choose any of the available shortcodes. From your WordPress admin account, search for the “WooCommerce Shortcodes” plug-in and install it on your website.
Next, let us look at how to insert a WooCommerce shortcode.
How to Insert WooCommerce Shortcodes?
After you have installed this plug-in, you can now view a new WooCommerce shortcode button in your page editor. On clicking this button, you can view the list of WooCommerce shortcodes. Click any of the available options to add it as a shortcode. For instance, you can insert the following WooCommerce shortcodes for products:
- Price/cart button
- Add to cart URL
- By SKU/ ID
For instance, the Price/cart button is used to display the price and the “Add to Cart” button of any product (based on the specified ID or SKU). On clicking this button, you can specify the product ID in the pop-up box, and then click OK to insert the shortcode. Here is the shortcode that appears for a product with ID 25:
To add your shortcodes on the WordPress webpage, you need to first publish the page from your page editor. Now, let us look at a complete list of WooCommerce shortcodes that you can use for your WordPress website.
List of All WooCommerce Shortcodes
Here is the complete WooCommerce shortcodes list that you can use for your website:
WooCommerce Shortcode | Description |
---|---|
|
Adds the WooCommerce cart functionality with all the products added by the user to their shopping cart. This shortcode does not need any additional parameters. |
|
Displays the checkout page with information such as the billing address, shipping address, and order details. Even this shortcode does not need any additional parameters. |
|
Displays the user’s account information including name, email address, and password change. You can also add the customer’s previous order details. This shortcode does not need any additional parameters. |
|
This shortcode creates an Order Tracking page with the current status of the orders. No additional parameters are required for this shortcode. |
[woocommerce_product_search] |
This shortcode creates a search and filtering facility on the current page. It requires no additional parameters. |
|
Among the widely used shortcodes, this displays all the offered products. With this shortcode, you can add the “category” parameter to display products from the specified category. Additionally, you can use the “limit” parameter to limit the number of products being displayed. |
[products_categories] |
This shortcode can be used to display all your product categories on a single page. This shortcode does not have any additional parameters. |
[products_category] |
This is used to display a particular category or selected categories. You can also use the following parameters with this shortcode:
|
|
To create the “Add to Cart” button for a particular product, additional parameters include:
|
|
To display the URL of the product. It can use only two parameters namely id and sku. |
|
This shortcode displays messages or notifications. For example, “This product has been added to your cart.” |
|
This displays all the products that have been added recently to the shop. Additional parameters include “per-page” to specify the number of recent products to be displayed on each page. |
|
To display all your favorite products with the highlighted “star” icon. It uses the same parameters as . |
|
To display all products that are currently available on sale. |
|
To display all your best-selling products. |
|
To display all the products that have gained the best ratings from customers. |
|
To display the list of related products. |
Conclusion
In short, WooCommerce shortcodes are an effective mode of improving the functionality of your WooCommerce store and adding to the user experience. The best part is that shortcodes are flexible enough to be added anywhere including shopping pages, posts, blogs, or even sidebars.
Do you want to leverage the use of WooCommerce shortcodes on your store but are not sure how to? Flipper Code can help you. We have the expertise to elevate your WooCommerce development. If interested, request a quote today.