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

Categories

Related Blogs

How to hide particular category product on shop

To hide a particular category on the shop page using the `woocommerce_product_query` hook, you can modify the query parameters to exclude the category you want to hide. This approach allows you to customize the product query directly without modifying the main query.

How To Limit Search To Only Post Titles?

I added a text field to the posts filter form and I use s= parameter to make the search work. But how to search only in the title of the post (not in the content)? how to limit search to post titles? How to search only by Post Title?

How to Remove Product Tabs on Product Page

To remove product tabs on the WooCommerce product page, you can use the `woocommerce_product_tabs` filter. This filter allows you to modify or remove the default product tabs provided by WooCommerce. By removing the tabs you don’t want, you can customize the product page layout to suit your needs.

Jquery Form Validator

JQuery Form Validator is a featured jQuery plugin that makes it easy to validate user input while keeping your HTML clean from javascript code.