Shortcodes of Woocommerce and everything what they can do by your store online

shortcode-products-woocommerce

In spite of being one of main the tool to create stores online (not it tenth we, but a study realised by BuiltWith), little people know the utility shortcodes of Woocommerce.

How? Don't You know either of what we spoke to you? Then you are losing an incredible potential… 

You want to discover how to give to your store an extra him of functionalities? Or how to put the button of purchase in the site that you want? Generally, you want to know everything what they can do by you?

You only must continue reading.

What are shortcodes of Woocommerce?

Before happening to tell you all the shortcodes of Woocommerce (or at least the most used), it is important that you know of what they consist.

He is very simple to understand, already you will see. 😉

Shortcode is not more than a “short cut” concerning code that you can add in the text editor of Woocommerce.

When including it, which beams is to execute a pre-established function of an agile and simple way, without the necessity to have no type of knowledge on programming.

The form in which they are used is writing an expression (that it will change based on which you want to obtain) in brackets ([]), being something thus:

[UnShortcodeCualquiera]

Good, that is a version very simplified since some of them allow to add parameters. But that we will see it more ahead, you do not worry.

And if you are asking yourself “really in the century in that we lived I must learn a list to me of shortcodes and to introduce them by hand” the answer is yes and no.

As it is obvious you can decide on the method manual but, if you look for a more visual way to have them to your reach, can use plugin official.

woocommerce-shortcodes-plugin

Thanks to him, you will have all the short cuts to mouse blow while you write with the publisher of all the life.

All the shortcodes of Woocommerce

Now yes, the moment arrives for seeing in depth what can do by you, and by your store online, each of these short cuts.

Your store shines spectacular thanks to theme that you use and takes very little in loading, now we are going to give a return him of nut more thanks to shortcodes.

1. Shortcodes of page

One is 4 short cuts that usually are not used because their functionalities agree with the pages that Woocoomerce creates during the installation assistant.

In fact, it is quite common that those 4 pages are only these shortcodes:

  • [woocommerce_cart]: it shows in screen all the interface of the coupon, shopping cart and other element.
  • [woocommerce_checkout]: it prints the page of payments.
  • [woocommerce_my_account]: it allows to accede to the user to his Control Panel.
  • [woocommerce_order_tracking]: so that your clients can make the pursuit of their order.

Shortcode [woocommerce_my_account] shows by defect last the 15 orders that have realised, but you can modify adding it to the parameter “order_count”.

For example, if you want that only they appear the 5 last purchases, you can write [woocommerce_my_account order_count = “5”].

And if you want that it shows all, order_count must be equal to -1.

2. Shortcodes of products

We arrive finally at where it is the “sauce” of all this. Here it is where the authentic magic begins to flow and where you will be able to do virguerías with your products.

Thanks to this type of short cut, you can show anyone of your articles only has where you want, with adding [product].

Sure, what product shows? In order to indicate it, you can use you go or sku (bench mark). In order to know you go, it enters the panel of Woocommerce and punctures in “Products” within the menu of the left.

Soon it is enough with passing the mouse superficially so that it appears the number of identification.

shortcode-woocommerce-it lie down

So, to show the article of the image you would have to write [product id=” 243 ″].

With this method it will appear in screen:

  • Name.
  • Image.
  • Price.
  • Button of purchase.

Perhaps but you want to show the whole page. For it you must use [product_page id=” 243 ″].

You want that several see themselves simultaneously? Very simple, you only must add, between the quotation marks and separated by commas, the rest of ids. For example [product_page id=” 243.123.321 ″].

If what you look for is to group articles, they exist multiple shortcodes of Woocommerce to do it:

  • [best_selling_products]: so that they appear the sold products more.
  • [featured_products]: an outstanding list.
  • [recent_products]: the last added products.
  • [related_products]: it shows related articles.
  • [sale_products]: merchandise that have been reduced.
  • [top_rated_products]: the articles better evaluated.

The majority of these short cuts allows to add parameters to obtain from exact form what you look for:

  • Limit: in order to indicate the maximum number of articles.
  • Columns: in how many columns will be divided.
  • Orderby: you can order them per date, you go, number chosen in the card, popularity, random, valuation, title.
  • Order: in order to indicate if you want that they are organized of ascending or descendent form.

But it does not finish here. Also you can show your products grouped in category writing: [product_category category=” loQueSea”].

The possibility even exists of listing the own categories, everything thanks to shorcode: [product_categories].

And to all this, add the possibility to him of filtering your articles thanks to his attributes.

It imagines that you have a store of t-shirts and in a place, you only want that they appear those of size XL. It is enough with which you write [product_attribute attribute=” size” filter=” XL”].

3. Shortocodes of the car

If the short cuts of before are interesting by everything what it is possible to be obtained with them, of whom will speak you next do not have left yourself back, since they are the ones in charge to show the button to buy.

And what would be of your store without that button?

In order to implement you have it two options:

  • [add_to_cart id=” 321 ″]: in order to add to the car of the purchase the product with you go indicated (321 in this case).
  • [add_to_cart_url id=” 123 ″]: in this case, it shows in screen the URL of the product at issue.

And thus it is as you can place a button of purchase in any side of your webpage.

Shortcodes of Woocommerce, everything a world to discover

Up to here the post on shortcodes of Woocommerce. Since you will have seen, one is a quite ample subject but it can get to be something complex.

With this we mean that there are many possibilities that we have left something in the inkpot. If you think that thus it is, it would enchant to us that you wrote us in the commentaries of more down.

It is the only way to have a post complete to the 100%!

What you tell us? We followed more down? 😉