Useful Wordpress Wocommerce Shortcodes List

May 06, 2020 - wocommerce, wordpress
Wocommerce Shortcodes List
 
Looking for Wocommerce Shortcodes List for Wordpress?


Wocommerce Shortcodes helps you to add different types of functionality to your post, pages, widget, sidebar, etc without writing tons of lines of code in Wordpress.

Here is the list of Wocommerce Shortcodes that may be useful and save your time.


1.Wocommerce Shortcode for Page:


 Wocommerce page shortcode lets you add the default page provided by Wocommerce. You can add this code directly to your page of WordPress.

[woocommerce_cart] => Display Cart Page
[woocommerce_checkout] =>Display Checkout Page
[woocommerce_order_tracking] => Display Order Tracking page
[woocommerce_my_account] => Display My Account page


2. Wocommerce Shortcode for Products:


Wocommerce product shortcode lets you display products on the basis of Id, Category, Slug, Recent Products, Featured Products, Sale Products, Best Selling Products, Top Rated Products, Related Products, etc

a. Display Multiple Product Shortcode on the basis of Id.


[products ids="1, 2, 3, 4, 5"] 
Display product containg Ids 1, 2, 3, 4, 5 respectively.
[products ids="1, 2, 3" orderby="date" columns="3" order="desc"]
Display product containing Ids 1, 2, 3 respectively, order by date, 3 columns and in Descending order.

b. Display Products on the basis of Category


[product_category category="one"] 
 Display products having category name =one.

We can use multiple properties inside this shortcode such as number, orderby, order, columns, hide_empty, parent, ids, etc.

number = "null" =>This shortcode represents the number of categories.

orderby = "name"=> This shortcode represents the order, “name” and “date” are valid options.

order = "ASC" or “DESC“ =>This shortcode represents how product categories are ordered in Ascending or Descending.

columns = "4"=>This shortcode defines the number of columns categories are organized into.

hide_empty = "1"=>This shortcode represents Set to 1 to hide categories with no products or 0 to show them.

parent = "0" =>This shortcode represents Set to 0 to only display top-level categories.

ids="unique ids" =>  This shortcode represents that IDs can be set to only output specified results.

Example:
[product_category category="one" columns = "4" hide_empty = "1" order = "ASC"]
Display products having a category name is one, 4 columns, hide empty products, and in Ascending order.

c. product category by slug


[product_category category="Category 1" per_page="16" columns="3" orderby="date" order="desc"]

Displays products having category name Category 1, 16 products per page, order by date in descending order.

d. Product on the basis of a tag


[products tag="hoodie"] 
 Displays products having tag name is hoodie.

e. Autogenerated Products by Wocommerce.


a. Recent Products: Displays products that are recently added.

[recent_products per_page="12" columns="4" orderby="date" order="ASC"]

b. Featured Products: Displays featured products that we can select manually.

[featured_products per_page="12" columns="4" orderby="date" order="ASC"]

c Sale Products: Displays products that are put on sale.

 [sale_products per_page="12" columns="4" orderby="date" order="ASC"]

d. Best Selling Products: Displays products that have the highest number of sales.

[best_selling_products per_page="12" columns="4" orderby="date" order="ASC"]

e. Top Rated Products: Displays products that have the highest number of ratings.

[top_rated_products per_page="12" columns="4" orderby="date" order="ASC"]

f. Related Products: Displays products that are similar to a displayed single product.

 [related_products per_page="12"]



3. Product Search Field shortcode

[woocommerce_product_search] 
 Displays Search Field for Wocommerce Products. 

4. Woocommerce live product filter shortcode


[woocommerce_product_filter]- live product search filter

[woocommerce_product_filter_attribute]-live product search by attribute

[woocommerce_product_filter_category]- search by category

[woocommerce_product_filter_price]- search filter by price

[woocommerce_product_filter_tag]- filter by tag


5. Wocommerce Add To Cart Button


 The below code will show the price and add to cart button of a single product.

[add_to_cart id="99"] 
 show the price and add to cart button of a single product having id=99.