Shortcodes included with WooCommerce

WooCommerce comes with several shortcodes that you can use to display various elements and functionalities on your WordPress website. These shortcodes allow you to customize the appearance and layout of your WooCommerce store. Here are some of the essential shortcodes included with WooCommerce:

**1. Product Shortcodes:**
– `[products]`: Displays a grid of products on any page or post.
– `[featured_products]`: Displays a grid of featured products.
– `[sale_products]`: Displays a grid of products on sale.
– `[best_selling_products]`: Displays a grid of best-selling products.
– `[recent_products]`: Displays a grid of recently added products.
– `[product]`: Displays a single product with details like title, price, and “Add to Cart” button.

**2. Product Category Shortcodes:**
– `[product_category]`: Displays a grid of products from a specific product category.
– `[product_categories]`: Displays a list of product categories.

**3. Cart and Checkout Shortcodes:**
– `[cart]`: Displays the shopping cart page.
– `[checkout]`: Displays the checkout page.
– `[woocommerce_cart]`: Another shortcode to display the shopping cart page.
– `[woocommerce_checkout]`: Another shortcode to display the checkout page.
– `[woocommerce_order_tracking]`: Displays the order tracking form.

**4. Account and Login Shortcodes:**
– `[my_account]`: Displays the user account page.
– `[woocommerce_my_account]`: Another shortcode to display the user account page.
– `[woocommerce_login]`: Displays the login and registration form.

**5. Miscellaneous Shortcodes:**
– `[woocommerce_order_tracking]`: Displays the order tracking form.
– `[woocommerce_lost_password]`: Displays the lost password form.
– `[woocommerce_change_password]`: Displays the change password form.
– `[woocommerce_reset_password]`: Displays the reset password form.
– `[woocommerce_edit_account]`: Displays the account information update form.

These shortcodes can be added to any page or post using the WordPress editor or directly into your theme files using the `do_shortcode()` function.

For example, if you want to display a grid of featured products on your homepage, you can use the following shortcode:

[featured_products per_page="4"]

 

The specific parameters available for each shortcode and their customization options can be found in the official WooCommerce documentation or through the shortcodes documentation in the WordPress dashboard (WooCommerce > Shortcodes).

Related Blogs

Ajax Add to Cart Quantity on Shop WooCommerce

To enable AJAX add to cart with quantity selectors on the WooCommerce shop page, you’ll need to use JavaScript to handle the AJAX request and update the cart quantity dynamically. Below are the steps to achieve this:

How to add custom style and script in wordpress

`wp_enqueue_scripts` is a crucial action hook in WordPress that allows you to enqueue or register scripts and stylesheets properly. It is commonly used by theme and plugin developers to load necessary CSS and JavaScript files onto the front-end of a WordPress website.

Request A Quote

Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.