WooCommerce Mostly used Shortcode

Most use shortcode for popular eCommerce plugin WooCommerce.

Every time we are going to build an E-Commerce store with WooCommerce we all need to use shortcode.

Basic Store setup shortcode

We need put this shortcode to different pages and then those pages are ready to link with WooCommerce plugin

Page Shortcode
[woocommerce_cart] – shows the cart page
[woocommerce_checkout] – shows the checkout page
[woocommerce_my_account] – shows the user account page
[woocommerce_order_tracking] – shows the order tracking form

Product page shortcode

With this shortcode we can show different type of product on any page as we want

Product Shortcode
[featured_products] 
[sale_products]
[best_selling_products]
[recent_products]
[product_attribute]
[top_rated_products]
[best_selling]
[on_sale]

Product shortcode attribute

There is an opportunity to customize how your product appears on the page. You just need to put some extra value with your past shortcode.

If you want to display one row with 4 product

[products limit="4" columns="4" orderby="popularity" class="quick-sale" on_sale="true" ]

If you want to display my featured products, two per row, with a maximum of four items.

[products limit="4" columns="2" visibility="featured" ]

Newest Products

If you want to display the newest products first – four products across one row.
To accomplish this, we’ll use the Post ID (which is generated when the product page is created), along with the order and order by command.
Since you can’t see the Post ID from the frontend, the ID#s have been superimposed over the images.

[products limit="4" columns="4" orderby="id" order="DESC" visibility="visible"]

Specific Categories

If you only want to display hoodies and shirts, but not accessories. I’ll use two rows of four.

[products limit="8" columns="4" category="hoodies, tshirts" cat_operator="AND"]

Paginations

Display product with pagination. 4 product per page

[recent_products limit="12" columns="4" paginate="true"]

Reference: https://docs.woocommerce.com/document/woocommerce-shortcodes/

Previous Code

Enable Leverage browser caching & Compression

To speed up your website and get good score, Enabl ...

Next Code

Protected: WP user Login Notification

There is no excerpt because this is a protected po ...

Leave a Reply

Your email address will not be published.

thirteen − one =

    skype

    Need Coding Help?

    Connect Skype

    ACF

    JavaScript

    jQuery

    Others

    PHP

    WooCommerce

    WordPress

    Protected: WP user Login Notification

    This code is Protected. Contact Admin for password

    Create a new WordPress administrator via functions.php & FTP

    ...

    HTML img tag to HTML SVG tag [WordPress]

    Image to SVG for WordPress. Generate svg code from ...

    Add Custom element item in wp nav menu

    Add Element on last item of wp nav menu ...

    WordPress category or taxonomy list

    WordPress custom taxonomy term list with function ...

    top