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

0 Comment

    Leave a Reply

    Your email address will not be published.

    eleven − 4 =

    Add Custom element item in wp nav menu

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

    Conditional statement to show pagination

    Conditional statement to show pagination on WordPr ...

    WordPress Next and Previous Post

    WordPress Next and Previous Post navigation for cu ...

    HTML img tag to HTML SVG tag [WordPress]

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

    wp-config development code

    WordPress post revisions, debug, load-scripts.php ...

    ACF

    JavaScript

    jQuery

    Others

    PHP

    WooCommerce

    WordPress

    skype

    Need Coding Help?

    Connect Skype
    top