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).

Share This On :

Leave a Comment

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